Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Jun 2001 16:13:53 -0500
From:      Mike Meyer <mwm@mired.org>
To:        Igor Podlesny <poige@morning.ru>
Cc:        Peter Pentchev <roam@orbitel.bg>, freebsd-hackers@FreeBSD.ORG, freebsd-isp@FreeBSD.ORG
Subject:   Re: Re[2]: Flight of the rat, living wreck.....
Message-ID:  <15166.16657.406627.673835@guru.mired.org>
In-Reply-To: <1806975199.20010630192712@morning.ru>
References:  <754836544.20010630185133@morning.ru> <20010630140907.A947@ringworld.oblivion.bg> <1806975199.20010630192712@morning.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
Igor Podlesny <poige@morning.ru> 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.

	<mike

--
Mike Meyer <mwm@mired.org>			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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15166.16657.406627.673835>