[BusyBox] Re: ifconfig: Clean up. [PATCH]
Jason Schoon
floydpink at gmail.com
Mon Jul 25 02:08:15 UTC 2005
I agree about reducing the ifdefs, but I always feel a bit leery about
relying on the compiler to remove dead code. This isn't relevent for
Busybox, but in my other code I always use lint, which throws annoying
warnings on things like that.
I would vote for a macro such as DO_CLEANUP(a) that simply evaluated
to nothing if cleanup is not defined, and call it unconditionally
wherever needed.
On 7/24/05, Rob Landley <rob at landley.net> wrote:
> On Sunday 24 July 2005 12:32, Shaun Jackman wrote:
> > Ping?
> >
> > -- sdj
>
> Hmmm...
>
> The problem is I really hate adding extra #ifdefs, especially for something
> that small. For 1.0.1 this doesn't really need to be addressed at all, and
> for 1.1 what would be really nice would be a general reorganization where we
> have libbb.h have one #ifdef that set "do_cleanup" to 0 or 1, and then we
> used if(do_cleanup) in the body of the code and let the compiler's dead code
> elimination yank it for us...
>
> Opinions?
>
> P.S. I just applied the ping.c patch. Looking at the others now. Still
> trying to put -rc2 together...
>
> Rob
> _______________________________________________
> busybox mailing list
> busybox at mail.busybox.net
> http://busybox.net/mailman/listinfo/busybox
>
More information about the busybox
mailing list