checkpatch emits two warnings of type:
CHECK: Comparison to NULL could be written "!foo"
Prefer `(!foo)` instead of `(foo == NULL)`.
Do not use comparison to NULL, use !foo
Signed-off-by: Tobin C. Harding <me@tobin.cc>
clientfds = realloc(mon->clientfds,
(mon->clientfds_size + CLIENTFDS_CHUNK) * sizeof(mon->clientfds[0]));
- if (clientfds == NULL) {
+ if (!clientfds) {
ERROR("Failed to realloc memory for %d client file descriptors",
mon->clientfds_size + CLIENTFDS_CHUNK);
goto err1;
lxc_strmunmap(buf, sb.st_size);
}
- if (owner == NULL)
+ if (!owner)
return NULL;
ret = snprintf(nicname, sizeof(nicname), "vethXXXXXX");