[U-Boot] unused dhcp option?
Ben Warren
biggerbadderben at gmail.com
Thu Aug 6 19:28:47 CEST 2009
Hi Robin,
Robin Getz wrote:
> As far as I can tell - the dhcp_leasetime var is not accessed outside of the
> net/bootp.c file, and it isn't actually used anywhere, just written to - so
> it is not removed by --gc-sections. :(
>
> net/bootp.c:unsigned long dhcp_leasetime = 0;
>
> net/bootp.c: NetCopyLong (&dhcp_leasetime, (ulong *) (popt + 2));
>
> So, it should be declared as static, or removed completely -- which do you
> prefer? (for size - I would prefer punt).
>
> -Robin
>
Yeah, looks like it's not referenced anywhere. I say replace it with a
comment like so many other parts of the packet:
/* Ignore Lease Time Field*/
regards,
Ben
More information about the U-Boot
mailing list