Re: coding style (was Re: [PATCH][2.5] UTF-8 support in console)

From: viro (viro@parcelfarce.linux.theplanet.co.uk)
Date: Sat May 31 2003 - 13:04:19 EST


On Sat, May 31, 2003 at 11:14:08AM -0600, Steven Cole wrote:

> statement when needed.
>
> return -ETOSENDERADDRESSUNKNOWN; /* this is OK */
> return (value & ZORRO_MASK); /* so is this */

Like hell it is. Parenthesis are _not_ needed here - production is
<statement> -> return <expression> ;

The only messy '('-related case in C grammar is sizeof as unary operation
vs. sizeof ( <type> ) (lovely way to torture parsers and students on exam:
sizeof (int)*p). Everything else is pretty straightforward...
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/