svn commit: trunk/busybox/networking

vda at busybox.net vda at busybox.net
Mon Jul 23 22:44:17 UTC 2007


Author: vda
Date: 2007-07-23 15:44:15 -0700 (Mon, 23 Jul 2007)
New Revision: 19241

Log:
zcip: remove stray seed48. It's the only thing which was pulling in
rand48 machinery:

zcip_main                                           1552    1537     -15
seed48                                                22       -     -22
__libc_drand48_data                                   24       -     -24
seed48_r                                              78       -     -78
__GI_seed48_r                                         78       -     -78
------------------------------------------------------------------------------
(add/remove: 0/4 grow/shrink: 0/1 up/down: 0/-217)           Total: -217 bytes



Modified:
   trunk/busybox/networking/zcip.c


Changeset:
Modified: trunk/busybox/networking/zcip.c
===================================================================
--- trunk/busybox/networking/zcip.c	2007-07-23 21:05:06 UTC (rev 19240)
+++ trunk/busybox/networking/zcip.c	2007-07-23 22:44:15 UTC (rev 19241)
@@ -198,8 +198,6 @@
 
 	memset(&L, 0, sizeof(L));
 
-	srand(MONOTONIC_US());
-
 #define FOREGROUND (opts & 1)
 #define QUIT       (opts & 2)
 	// parse commandline: prog [options] ifname script
@@ -254,8 +252,7 @@
 	// the hardware address or else the last address we used.
 	// NOTE: the sequence of addresses we try changes only
 	// depending on when we detect conflicts.
-	// (SVID 3 bogon: who says that "short" is always 16 bits?)
-	seed48( (unsigned short*)&ifr.ifr_hwaddr.sa_data );
+	srand(*(unsigned*)&ifr.ifr_hwaddr.sa_data);
 	if (ip.s_addr == 0)
 		pick(&ip);
 




More information about the busybox-cvs mailing list