[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nmh-workers] Another questionable piece of code
From: |
Jon Steinhart |
Subject: |
Re: [Nmh-workers] Another questionable piece of code |
Date: |
Tue, 17 May 2005 15:31:26 -0700 |
> On Sun, 15 May 2005 22:30:45 PDT, Jon Steinhart said:
> > So, ask per earlier messages, I'm looking at the context/profile
> > code and trying to clean it up as I make the changes that I need.
> >
> > There's a pretty strange function called context_foil(). In all
> > but two of the places where it is called it is called with a NULL
> > argument so it does nothing except set the globals defpath and
> > context to "/dev/null", and none of these calling programs ever
> > reference these globals.
> >
> > So it seems to me that these calls are bogus and can be removed.
> > Does anybody know the history of context_foil() and if so please
> > shed some light on what's going on here.
>
> That's sounding like a fallback for "We've discovered a corrupted/odd
> config, fall back to something sane". Have you verified that the programs
> that call it with NULL never make *other* use (quite possibly indirect,
> via a library/utility function)? Or are the globals defpath and context
> truly "dead code" that's not *used* at all?
As near as I can tell they are not dead code because they are used in other
programs that don't call context_foil(NULL), but are not used in the programs
that do.
Jon