"Strange" patch in Git?

Rich Felker dalias at aerifal.cx
Tue Sep 13 13:38:04 UTC 2011


On Tue, Sep 13, 2011 at 03:02:29PM +0200, Bernhard Reutner-Fischer wrote:
> On Sun, Sep 11, 2011 at 01:32:36PM +0200, Matthias Andree wrote:
> >I see this recently changed in shell/hush.c:
> >
> >-# if defined MAX_HISTORY && MAX_HISTORY > 0 && ENABLE_HUSH_SAVEHISTORY
> >+# if MAX_HISTORY > 0 && ENABLE_HUSH_SAVEHISTORY
> >
> >Is it guaranteed that MAX_HISTORY is always defined?
> 
> AFAICR yes (see include/libbb.h).

It doesn't matter; an undefined symbol in #if gets replaced by the
preprocessor with the token 0. The only danger is that MAX_HISTORY
might be defined with an empty definition or non-parsable definition,
but that would be a bug in whatever code/script defined it.

Rich


More information about the busybox mailing list