Subject: Stylistic no-nos
To: None <netbsd-bugs@NetBSD.ORG>
From: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
List: netbsd-bugs
Date: 11/22/1995 10:19:59
>> Actually, there are other stylistic no-nos in rcmd.c (assuming
>> boolean value of a == b is either 0 or 1)
> This is not a stylistic nono.  K&R 2 specifies that.  [...]
> There is more code in the kernel that uses my pet peeve stylistic
> nono:
> 	value = !! expression;
> instead of:
> 	value = expression != 0;

Um, K&R (both I and II) specifies that !!expression is the same as
expression!=0 (except for precedence complications if the expression
isn't parenthesized, of course).  So you're being inconsistent here,
saying that one thing isn't a stylistic no-no 'cause K&R says it's
guaranteed, and then saying something else that K&R guarantees _is_ a
stylistic no-no.  (Personally, neither one bothers me as a style
matter; my pet style peeves are different.  I won't mention them here
in an attempt to keep this from degenerating into a style gripe
session.  Mail me privately if you're interested in 'em.)

					der Mouse

			    mouse@collatz.mcrcim.mcgill.edu