Tweak NULL-pointer checks
Use !p and p when comparing pointers as opposed to explicit checks against NULL. This is generally easier to read.
This commit is contained in:
@@ -43,7 +43,7 @@ main(int argc, char *argv[])
|
||||
return 1;
|
||||
|
||||
if (fflag) {
|
||||
if (realpath(argv[0], buf) == NULL)
|
||||
if (!realpath(argv[0], buf))
|
||||
exit(1);
|
||||
} else {
|
||||
if ((n = readlink(argv[0], buf, sizeof(buf) - 1)) < 0)
|
||||
|
Reference in New Issue
Block a user