Index: share/man/man9/style.9 =================================================================== --- share/man/man9/style.9 +++ share/man/man9/style.9 @@ -25,7 +25,7 @@ .\" From: @(#)style 1.14 (Berkeley) 4/28/95 .\" $FreeBSD$ .\" -.Dd October 28, 2020 +.Dd May 27, 2021 .Dt STYLE 9 .Os .Sh NAME @@ -756,9 +756,10 @@ !(p = f()) .Ed .Pp -Do not use -.Ic \&! -for tests unless it is a boolean, e.g., use: +Do not test without a comparison, or with unary +.Ic \&! +(except for booleans). +For example, use: .Bd -literal if (*p == '\e0') .Ed @@ -768,6 +769,16 @@ if (!*p) .Ed .Pp +Prefer: +.Bd -literal +if (count != 0) +.Ed +.Pp +over: +.Bd -literal +if (count) +.Ed +.Pp Routines returning .Vt "void *" should not have their return values cast