On Tue, Nov 03, 2009 at 03:00:29PM -0800, Bernd Petrovitsch wrote:
> On Die, 2009-11-03 at 14:44 -0800, David N. Lombard wrote: 
> > On Tue, Nov 03, 2009 at 01:42:48PM -0800, Alexander Shishkin wrote:
> > > On Втр, Ноя 03, 2009 at 04:28:09 +0100, Denys Vlasenko wrote:
> > > >           assert (*buffer == info->buffer);
> > > >           *buffer = info->buffer;
> [...] 
> > I wonder if this started out as much different code, with the order 
> > reversed,
> > the assignment within some hopelessly convoluted conditional making the 
> > assert()
> > macro a Good Thing(TM).  At least then one could claim an infinitesimal 
> > shred
> > of plausible deniability... :p
> 
> The other interpretation is that one wants to catch bugs in the
> development/testing phase (otherwise the assert() doesn't make that much
> sense) and for a release, one adds "-DNDEBUG" to the CPPFLAGS so that
> the assignment just papers over a bug and adds (false?) robustness.

I wish that I could say I've never seen an error like "buffer has wrong
value, should be 'info->buffer' at this point" corrected in exactly this way :(

-- 
David N. Lombard, Intel, Irvine, CA
I do not speak for Intel Corporation; all comments are strictly my own.
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to