Hi, On Tue, 25 Nov 2008 10:46:30 -0800 "Luis R. Rodriguez" <lrodriguez@xxxxxxxxxxx> wrote: > > On Tue, Nov 25, 2008 at 06:57:01AM -0800, John W. Linville wrote: > > I have the patch now...thanks! > > > > Now, if I only knew why my build didn't fail with the original code... > > Same here I run tests with sparse too prior to sending patches. It is valid C. if (a, b) you evaluate a and discard it then evaluate b and that is the value of the conditional expression. In this case b is just a string which is effectively a non NULL "const char *" which is just non zero as far as if is concerned. So the conditional expression evaluates to (constant) true. So this was, in fact a bug ... -- Cheers, Stephen Rothwell sfr@xxxxxxxxxxxxxxxx http://www.canb.auug.org.au/~sfr/
Attachment:
pgpYJOZDtEpBl.pgp
Description: PGP signature