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
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to