svn commit: r204178 - head/games/fortune/fortune

Robert Watson rwatson at FreeBSD.org
Mon Feb 22 11:27:48 UTC 2010


On Sun, 21 Feb 2010, Ulrich Spoerlein wrote:

>  Prefer exit(0) from main over return(0).
>
>  Although not explicitly mentioned in style(9), it allows for easier
>  grepping of exit points. This reverts part of r203926.

A few people (including me) have tripped up over exit handling and style in 
the past.  It might be nice to formulate some specific sentences about program 
exit paths, functions, and also return values, to put in the style guide.

For example, we have sysexits(3), but my understanding is we prefer not to use 
it.  Likewise, we do like to use err()/warn() in preference to perror() and 
exit(), etc.

Robert


More information about the svn-src-all mailing list