aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2009-01-14 00:28:03 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2009-01-14 00:28:03 +0000
commitec64a5775e6836f7a74d2262001ef68d3110a243 (patch)
treec69ad523e0bb9408501b96bfd2925dbff81d3d3a
parent1265df1f3194db1da2b9d711772038d6045e2ef4 (diff)
downloadbusybox-w32-ec64a5775e6836f7a74d2262001ef68d3110a243.tar.gz
busybox-w32-ec64a5775e6836f7a74d2262001ef68d3110a243.tar.bz2
busybox-w32-ec64a5775e6836f7a74d2262001ef68d3110a243.zip
dhcpc: suppress "warning: 'timestamp_before_wait' might be used uninitialized
-rw-r--r--networking/udhcp/dhcpc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
index 115cddbf0..da58a5a8e 100644
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -324,7 +324,8 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
324 * "continue" statements in code below jump to the top of the loop. 324 * "continue" statements in code below jump to the top of the loop.
325 */ 325 */
326 for (;;) { 326 for (;;) {
327 unsigned timestamp_before_wait; 327 /* silence "uninitialized!" warning */
328 unsigned timestamp_before_wait = timestamp_before_wait;
328 329
329 //bb_error_msg("sockfd:%d, listen_mode:%d", sockfd, listen_mode); 330 //bb_error_msg("sockfd:%d, listen_mode:%d", sockfd, listen_mode);
330 331
@@ -441,7 +442,7 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
441 * try to find DHCP server using broadcast */ 442 * try to find DHCP server using broadcast */
442 if (timeout > 0) { 443 if (timeout > 0) {
443 /* send a request packet */ 444 /* send a request packet */
444 send_renew(xid, 0 /* INADDR_ANY*/, requested_ip); /* broadcast */ 445 send_renew(xid, 0 /*INADDR_ANY*/, requested_ip); /* broadcast */
445 timeout >>= 1; 446 timeout >>= 1;
446 continue; 447 continue;
447 } 448 }