svn commit: trunk/busybox/networking
Robert P. J. Day
rpjday at mindspring.com
Sat Jul 1 13:22:27 PDT 2006
On Sat, 1 Jul 2006, Paul Fox wrote:
> > > >
> > > >-#if 0
> > > >-#define debug_noise(fmt, args...) printf(fmt, ## args)
> > > >-#else
> > > > #define debug_noise(fmt, args...)
> > > >-#endif
> > > >
> > > > /* Forward declaration */
> > > > struct interface_defn_t;
> > >
> > > Whoever that may be..
> > > Doing stuff like this is nonsense, to say the least.
> >
> > um ... no, it isn't, since the notion of removing "dead" or "unused"
> > code in the source tree has been discussed more than once before, and
> > no one seemed all that upset by the suggestion at the time.
>
> that code is clearly not "dead". it's someone being lazy. (i.e.
> all they have to do to run on debugging is change a single character
> in the source file.) if you don't want it to be "#if 0", change it
> to "#if DEBUG", but don't remove the entire thing. if you do that,
> you might as well go through the file and remove all the invocations
> of that macro, too.
admittedly, when i go back and look at the changes i committed, that
is the one example where, if i had looked at it for a couple more
seconds, i would have made a different decision. yours and bernhard's
points are well taken.
on that note, would someone like to suggest a standard for what
maintainers should use if they want to do that sort of thing in their
own code? i'm leery of something as generic as "#ifdef DEBUG" since
that just *begs* to have code start clashing.
rday
More information about the busybox
mailing list