Messages in this thread | | | Subject | Re: [BUG] Bad #define, nonportable C, missing {} | From | Chris Gray <> | Date | 22 Nov 2001 15:43:15 -0500 |
| |
On Wed, 21 Nov 2001, Vincent Sweeney wrote: >> >> drivers/block/paride/pf.c: if (l==0x20) j--; targ[j]=0; >> drivers/block/paride/pg.c: if (l==0x20) j--; targ[j]=0; >> drivers/block/paride/pt.c: if (l==0x20) j--; targ[j]=0; >> (these files need Lindenting too) >> ---------- >> Missing {} Either a bug or a very bad style (so bad that I can even >> imagine that it is NOT a bug). Please double check before applying >> the patch! -- vda > > C std says IFF you have one expression after the for() then you can > omit the {}'s. So this is NOT a bug or bad coding style its just > saving some bytes in the source code :)
The point here is that what is written as
if(l==0x20) j--; targ[j]=0;
is actually
if(l==0x20) j--; targ[j]=0;
and not the
if(l==0x20){ j--; targ[j] = 0; }
that it appears to be. I wouldn't like to use 'l' as a variable either, but that's just me.
Cheers, Chris - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |