Cristian Ionescu-Idbohrn schrieb:
> I see this warning, and I don't like it:
> 
> busybox-1.13.2/networking/udhcp/dhcpc.c:
> In function `udhcpc_main':
> busybox-1.13.2/networking/udhcp/dhcpc.c:321:
> warning: `timestamp_before_wait' might be used uninitialized in this function
> 
> Is this patch appropriate?
> 
> --- busybox-1.13.2/networking/udhcp/dhcpc.c.~1~       2008-11-09 
> 18:27:58.000000000 +0100
> +++ busybox-1.13.2/networking/udhcp/dhcpc.c   2009-01-13 13:09:30.000000000 
> +0100
> @@ -342,7 +342,8 @@
>                               /* Else: an error occured, panic! */
>                               bb_perror_msg_and_die("select");
>                       }
> -             }
> +             } else
> +                     timestamp_before_wait = 0;
> 
>               /* If timeout dropped to zero, time to become active:
>                * resend discover/renew/whatever
> 
> 
> Cheers,
> 

maybe a simple
  unsigned timestamp_before_wait=0;

will do the same ?

re,
 wh

btw: can unsigned be replaced with unsigned int or whatever is useful here ?
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to