[BusyBox] Re: ifconfig: Clean up. [PATCH]

Tito farmatito at tiscali.it
Mon Jul 25 06:24:43 UTC 2005


On Monday 25 July 2005 06:14, Erik Andersen wrote:
> On Sun Jul 24, 2005 at 08:50:39PM -0500, Rob Landley wrote:
> > On Sunday 24 July 2005 12:32, Shaun Jackman wrote:
> > Opinions?
> 
> I think we need to have a #define in the busybox header file
> such as:
> 
>     #ifdef CONFIG_FEATURE_CLEAN_UP
>     # define	#do_cleanup	1
>     #else
>     # define	#do_cleanup	0
>     #endif
> 
> and then applet code will simply do:
> 
>     if (do_cleanup)
>     {
> 	// Stuff
>     }
> 
> such that the entire block of code will be pruned by gcc when
> do_cleanup is 0...  A similar approach could also be used to
> remove a number of other #defines.
> 
>  -Erik
Hi, i personally am all for the macro solution for just
one simple reason:

macro = 1 line of code

define = at least (if correctly indented) 3 lines.

So more code fits on one screen using macros and more code you can see at one time better
you can understand it and optimize it as the human eye works not like a compiler and has
not dead code detection.

Just my vote.

Ciao,
Tito



More information about the busybox mailing list