svn commit: trunk/busybox/networking/udhcp

vda at busybox.net vda at busybox.net
Wed Jan 14 00:28:05 UTC 2009


Author: vda
Date: 2009-01-14 00:28:03 +0000 (Wed, 14 Jan 2009)
New Revision: 24824

Log:
dhcpc: suppress "warning: 'timestamp_before_wait' might be used uninitialized



Modified:
   trunk/busybox/networking/udhcp/dhcpc.c


Changeset:
Modified: trunk/busybox/networking/udhcp/dhcpc.c
===================================================================
--- trunk/busybox/networking/udhcp/dhcpc.c	2009-01-13 21:02:43 UTC (rev 24823)
+++ trunk/busybox/networking/udhcp/dhcpc.c	2009-01-14 00:28:03 UTC (rev 24824)
@@ -324,7 +324,8 @@
 	 * "continue" statements in code below jump to the top of the loop.
 	 */
 	for (;;) {
-		unsigned timestamp_before_wait;
+		/* silence "uninitialized!" warning */
+		unsigned timestamp_before_wait = timestamp_before_wait;
 
 		//bb_error_msg("sockfd:%d, listen_mode:%d", sockfd, listen_mode);
 
@@ -441,7 +442,7 @@
 				 * try to find DHCP server using broadcast */
 				if (timeout > 0) {
 					/* send a request packet */
-					send_renew(xid, 0 /* INADDR_ANY*/, requested_ip); /* broadcast */
+					send_renew(xid, 0 /*INADDR_ANY*/, requested_ip); /* broadcast */
 					timeout >>= 1;
 					continue;
 				}



More information about the busybox-cvs mailing list