Page MenuHomeFreeBSD

D30507.diff
No OneTemporary

D30507.diff

diff --git a/share/man/man9/style.9 b/share/man/man9/style.9
--- a/share/man/man9/style.9
+++ b/share/man/man9/style.9
@@ -746,9 +746,10 @@
!(p = f())
.Ed
.Pp
-Do not use
+Do not test without a comparison, or with unary
.Ic \&!
-for tests unless it is a boolean, e.g., use:
+(except for booleans).
+For example, use:
.Bd -literal
if (*p == '\e0')
.Ed
@@ -758,6 +759,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

File Metadata

Mime Type
text/plain
Expires
Wed, Nov 20, 11:26 AM (22 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14620513
Default Alt Text
D30507.diff (569 B)

Event Timeline