diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2005-05-15 22:38:27 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2005-05-15 22:38:27 +0000 |
commit | d7a7f8a12607d4507605cd7d434d5df172fa509a (patch) | |
tree | 5fb3bdf04e83c3e3c9e1e4b5507e0dda40485a7d | |
parent | dda364e6c2ba246aeb807e323cba62a1cfbe0ecf (diff) |
Update style recommendation around NULL usage, especially in function
parameters, after discussions a while ago with mickey@, deraadt@,
millert@.
Verbiage by millert@, ok millert@.
-rw-r--r-- | share/man/man9/style.9 | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/share/man/man9/style.9 b/share/man/man9/style.9 index f307fd03874..051ae00537d 100644 --- a/share/man/man9/style.9 +++ b/share/man/man9/style.9 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: style.9,v 1.38 2004/04/10 09:10:16 jmc Exp $ +.\" $OpenBSD: style.9,v 1.39 2005/05/15 22:38:26 krw Exp $ .\" .Dd June 18, 2001 .Dt STYLE 9 @@ -516,11 +516,8 @@ is the preferred null pointer constant. Use .Dv NULL instead of -(type\ *)0 or (type\ *)NULL in contexts where the compiler knows the -type, e.g., in assignments. -Use (type\ *)NULL in other contexts, in particular for all function args. -(Casting is essential for variadic args and is necessary for other args -if the function prototype might not be in scope.) +(type\ *)0 or (type\ *)NULL in all cases except for arguments to variadic +functions where the compiler does not know the type. Test pointers against .Dv NULL , |