!(p = f())
.Ed
.Pp
Don't use '!' for tests unless it's a boolean, e.g. use
For tests, always compare the value to the appropriate 0 instead of
checking it directly, unless the value is a boolean.
For pointers, use:
.Bd -literal
if (p != NULL)
not
.PP
if (!p)
For other values, use:
if (*p == '\e0')
if (!*p)
if (*p)
unless the value is a boolean. In that case, use:
if (p)
and
Routines returning void * should not have their return values cast