From c05302791c128c7e29cd4beabfbcd8ce8036390a Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Sat, 6 Apr 2024 11:42:57 -0300 Subject: src/: Check "if (x != NULL)" instead of "if (x)" --- src/testing.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/testing.c') 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 -- cgit v1.2.3