Date: Thu, 07 Mar 2002 13:16:47 +0000 From: Mark Murray <mark@grondar.za> To: obrien@FreeBSD.org Cc: Mark Murray <mark@grondar.za>, Will Andrews <will@csociety.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.bin/rwall rwall.c Message-ID: <200203071316.g27DGlRV011103@grimreaper.grondar.org> In-Reply-To: <20020307042145.B66608@dragon.nuxi.com> ; from "David O'Brien" <obrien@FreeBSD.org> "Thu, 07 Mar 2002 04:21:45 PST." References: <20020307042145.B66608@dragon.nuxi.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> On Thu, Mar 07, 2002 at 12:06:49PM +0000, Mark Murray wrote:
> > > 2. please review the C idiom of short-circuit evaluation.
> >
> > I know this. See style(9) on complicated expressions.
>
> Please point out which section you are referring to. I glanced thru
> style(9) wondering if the if() style changes are mandated. Searching on
> "assignment" or "complicated" gave nothing. And the examples such as:
>
> if ((four = malloc(sizeof(struct foo))) == NULL)
>
> seem to approve the style.
(Lousy) example. I hate it when examples become rules.
The section I was referring to is:
Unary operators do not require spaces, binary operators do. Do not use
parentheses unless they are required for precedence or unless the state-
ment is confusing without them. Remember that other people may confuse
easier than you. Do YOU understand the following?
a = b->c[0] + ~d == (e || f) || g && h ? i : j >> 1;
k = !(l & FLAGS);
M
--
o Mark Murray
\_
O.\_ Warning: this .sig is umop ap!sdn
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200203071316.g27DGlRV011103>
