diff options
author | EuAndreh <eu@euandre.org> | 2024-04-06 11:42:57 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2024-04-06 11:42:57 -0300 |
commit | c05302791c128c7e29cd4beabfbcd8ce8036390a (patch) | |
tree | 22f85849cd2ed8c135182a85dffa45be69c03bec /src/testing.c | |
parent | Start "rc = -1" instead of 0 (diff) | |
download | pindaiba-c05302791c128c7e29cd4beabfbcd8ce8036390a.tar.gz pindaiba-c05302791c128c7e29cd4beabfbcd8ce8036390a.tar.xz |
src/: Check "if (x != NULL)" instead of "if (x)"
Diffstat (limited to 'src/testing.c')
-rw-r--r-- | src/testing.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/testing.c b/src/testing.c index b554ab9..aa58bc7 100644 --- a/src/testing.c +++ b/src/testing.c @@ -18,7 +18,7 @@ ENVVAR_NAME = "NO_COLOR"; static bool show_colour(void) { const char *const no_colour = getenv(ENVVAR_NAME); - return !no_colour || no_colour[0] == '\0'; + return (no_colour != NULL) && (no_colour[0] != '\0'); } void |