From owner-freebsd-isp Sat Jun 30 14:13:59 2001 Delivered-To: freebsd-isp@freebsd.org Received: from guru.mired.org (okc-27-141-144.mmcable.com [24.27.141.144]) by hub.freebsd.org (Postfix) with SMTP id 1791E37B406 for ; Sat, 30 Jun 2001 14:13:54 -0700 (PDT) (envelope-from mwm@mired.org) Received: (qmail 72261 invoked by uid 100); 30 Jun 2001 21:13:53 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15166.16657.406627.673835@guru.mired.org> Date: Sat, 30 Jun 2001 16:13:53 -0500 To: Igor Podlesny Cc: Peter Pentchev , freebsd-hackers@FreeBSD.ORG, freebsd-isp@FreeBSD.ORG Subject: Re: Re[2]: Flight of the rat, living wreck..... In-Reply-To: <1806975199.20010630192712@morning.ru> References: <754836544.20010630185133@morning.ru> <20010630140907.A947@ringworld.oblivion.bg> <1806975199.20010630192712@morning.ru> X-Mailer: VM 6.90 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Igor Podlesny types: > >> // so here we start looking through the queue > >> > >> > ia != NULL > >> > >> // sanity (I'd have written just (ia)) > > > Yep, just (ia) would have worked, but style(9) mandates (ia != NULL), > > which is much easier to understand > > :) > > Don't want to dispute about the 'right' style :), but :)) > I prefer to say (read, write) For FreeBSD code work, there is a "right" style. It's documented in the style(9) man page. Having everyone using the same style makes maintenance a lot saner. I think in this case, it says to use "if (ia != NULL)" instead of "if (ia)". It doesn't say so outright, but it strongly hints that tests for 0 should compare against the appropriate 0 unless the value is a boolean. http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message