diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-10-12 14:19:59 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-10-12 14:19:59 -0400 |
| commit | 6e5fb2ac4e5b780c74f310446ddd80d571170b0d (patch) | |
| tree | 587241a69065c01b890d7ae70a37af08bba646b1 /src/stdlib/stdlib.c | |
| parent | 3cd3b20f58e9d2c6463d503be09e5d4cfaadee6c (diff) | |
More code cleanups
Diffstat (limited to 'src/stdlib/stdlib.c')
| -rw-r--r-- | src/stdlib/stdlib.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/stdlib/stdlib.c b/src/stdlib/stdlib.c index 5204194b..dd6f804d 100644 --- a/src/stdlib/stdlib.c +++ b/src/stdlib/stdlib.c @@ -61,7 +61,8 @@ void tomo_init(void) { GC_INIT(); const char *color_env = getenv("COLOR"); USE_COLOR = color_env ? strcmp(color_env, "1") == 0 : isatty(STDOUT_FILENO); - if (getenv("NO_COLOR") && getenv("NO_COLOR")[0] != '\0') USE_COLOR = false; + const char *no_color_env = getenv("NO_COLOR"); + if (no_color_env && no_color_env[0] != '\0') USE_COLOR = false; setlocale(LC_ALL, ""); assert(getrandom(TOMO_HASH_KEY, sizeof(TOMO_HASH_KEY), 0) == sizeof(TOMO_HASH_KEY)); |
