dhcpc: suppress "warning: 'timestamp_before_wait' might be used uninitialized
This commit is contained in:
parent
1265df1f31
commit
ec64a5775e
@ -324,7 +324,8 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
|
|||||||
* "continue" statements in code below jump to the top of the loop.
|
* "continue" statements in code below jump to the top of the loop.
|
||||||
*/
|
*/
|
||||||
for (;;) {
|
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);
|
//bb_error_msg("sockfd:%d, listen_mode:%d", sockfd, listen_mode);
|
||||||
|
|
||||||
@ -441,7 +442,7 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
|
|||||||
* try to find DHCP server using broadcast */
|
* try to find DHCP server using broadcast */
|
||||||
if (timeout > 0) {
|
if (timeout > 0) {
|
||||||
/* send a request packet */
|
/* send a request packet */
|
||||||
send_renew(xid, 0 /* INADDR_ANY*/, requested_ip); /* broadcast */
|
send_renew(xid, 0 /*INADDR_ANY*/, requested_ip); /* broadcast */
|
||||||
timeout >>= 1;
|
timeout >>= 1;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user