Subject: Re: a few minor cleanups to src/share/misc/style
To: , <firstname.lastname@example.org>
From: Greg A. Woods <email@example.com>
Date: 03/22/2001 15:45:25
[ On Thursday, March 22, 2001 at 08:59:10 (+0100), Erik Bertelsen wrote: ]
> Subject: Re: a few minor cleanups to src/share/misc/style
> For NetBSD-specific userland programs the I see no real difference
> between using 0/1 instead of EXIT_SUCCESS/EXIT_FAILURE,
I see a huge difference in terms of typing (even with an abbrev in
In any case "exit(0)" and "exit(1)" are Unix (and C) idioms that
successful programmers need to understand implicitly regardless of what
NetBSD does and/or what any standards document coming down from on high
But then I also get angry that some people find
* (p = f()) == NULL
* !(p = f())
to be more readable. I claim exactly the opposite. It's also a lot
harder to type.
This is equally blood-pressure raising for me:
* Don't use `!' for tests unless it's a boolean.
* E.g. use "if (*p == '\0')", not "if (!*p)".
The test *is* boolean, damnit! :-)
Greg A. Woods
+1 416 218-0098 VE3TCP <firstname.lastname@example.org> <robohack!woods>
Planix, Inc. <email@example.com>; Secrets of the Weird <firstname.lastname@example.org>