From owner-freebsd-chat Tue Jan 23 7:16:36 2001 Delivered-To: freebsd-chat@freebsd.org Received: from shellyeah.org (zippy.shellyeah.org [140.186.112.25]) by hub.freebsd.org (Postfix) with SMTP id 6FDA837B401 for ; Tue, 23 Jan 2001 07:16:18 -0800 (PST) Received: (qmail 17105 invoked by uid 0); 23 Jan 2001 15:16:17 -0000 Received: from zippy.shellyeah.org (jcm@140.186.112.25) by zippy.shellyeah.org with SMTP; 23 Jan 2001 15:16:17 -0000 Date: Tue, 23 Jan 2001 10:16:17 -0500 (EST) From: Jonathon McKitrick To: "G. Adam Stanislav" Cc: freebsd-chat@FreeBSD.ORG Subject: Re: C style continued.... (Craig and Terry) In-Reply-To: <3.0.6.32.20010123091354.009de7c0@mail85.pair.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-chat@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > > if (0 == i) { > > foo(i); > > bar(i); } > > Of course, the whole problem with this example is not the formating > style, but the unnecessary use of a variable. It should be changed to: > > if (!i) {foo(0); bar(0);} Except that 'style' says we should not use '!' for tests, unless the variable is declared boolean. Otherwise, compare with 0. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-chat" in the body of the message