From owner-cvs-all Thu Mar 7 5:20:59 2002 Delivered-To: cvs-all@freebsd.org Received: from storm.FreeBSD.org.uk (storm.FreeBSD.org.uk [194.242.139.170]) by hub.freebsd.org (Postfix) with ESMTP id 9128937B404; Thu, 7 Mar 2002 05:20:47 -0800 (PST) Received: (from uucp@localhost) by storm.FreeBSD.org.uk (8.11.6/8.11.6) with UUCP id g27DKgv52942; Thu, 7 Mar 2002 13:20:43 GMT (envelope-from mark@grimreaper.grondar.za) Received: from grimreaper (localhost [127.0.0.1]) by grimreaper.grondar.org (8.12.2/8.12.2) with ESMTP id g27DGlRV011103; Thu, 7 Mar 2002 13:16:47 GMT (envelope-from mark@grimreaper.grondar.za) Message-Id: <200203071316.g27DGlRV011103@grimreaper.grondar.org> To: obrien@FreeBSD.org Cc: Mark Murray , Will Andrews , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.bin/rwall rwall.c References: <20020307042145.B66608@dragon.nuxi.com> In-Reply-To: <20020307042145.B66608@dragon.nuxi.com> ; from "David O'Brien" "Thu, 07 Mar 2002 04:21:45 PST." Date: Thu, 07 Mar 2002 13:16:47 +0000 From: Mark Murray Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > 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