Igor Podlesny <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message