From 117e1bd9efab2eabb3d406b30fdc56c0d0fa2c75 Mon Sep 17 00:00:00 2001 From: Garrett Wollman Date: Thu, 13 Jun 1996 19:52:42 +0000 Subject: [PATCH] Delete incorrect and misleading suggestion about NULL. I left in the part about testing pointers against NULL, even though I disagree with it personally. --- share/man/man9/style.9 | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/share/man/man9/style.9 b/share/man/man9/style.9 index f93122f381b..89976d6489f 100644 --- a/share/man/man9/style.9 +++ b/share/man/man9/style.9 @@ -13,7 +13,7 @@ files in the FreeBSD source tree. * * @(#)style 1.14 (Berkeley) 4/28/95 * - * FreeBSD $Id: style.9,v 1.5 1996/03/31 22:36:14 joerg Exp $ + * $Id: style.9,v 1.7 1996/04/07 08:37:54 mpp Exp $ * */ @@ -277,9 +277,8 @@ the declarations. Use this feature only thoughtfully. void *mymalloc __P((u_int)); .Ed .Pp -Casts and sizeof's are not followed by a space. NULL is any -pointer type, and doesn't need to be cast, so use NULL instead -of (struct foo *)0 or (struct foo *)NULL. Also, test pointers +Casts and sizeof's are not followed by a space. +Also, test pointers against NULL, i.e. use: .Bd -literal -offset 0i (p = f()) == NULL