Date: Tue, 23 Jan 2001 10:16:17 -0500 (EST) From: Jonathon McKitrick <jcm@shellyeah.org> To: "G. Adam Stanislav" <redprince@redprince.net> Cc: freebsd-chat@FreeBSD.ORG Subject: Re: C style continued.... (Craig and Terry) Message-ID: <Pine.GSO.4.21.0101231014560.7653-100000@zippy.shellyeah.org> In-Reply-To: <3.0.6.32.20010123091354.009de7c0@mail85.pair.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.21.0101231014560.7653-100000>