aboutsummaryrefslogtreecommitdiff
path: root/client.c
diff options
context:
space:
mode:
authorCraig Barnes <craigbarnes@protonmail.com>2024-01-24 23:17:28 +0000
committerDaniel Eklöf <daniel@ekloef.se>2024-02-05 11:09:52 +0000
commite0f3703ae6c4084f9275cfc78d87e5604cc27a10 (patch)
treecdfeebf67f6bb962c5543337b952fe6cf9d40587 /client.c
parentcsi: simplify handling of Set/Reset Mode (SM/RM) sequences (diff)
util: add streq() function and use in place of strcmp(...) == 0
Diffstat (limited to 'client.c')
-rw-r--r--client.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/client.c b/client.c
index 8456dfd8..8576531f 100644
--- a/client.c
+++ b/client.c
@@ -315,11 +315,11 @@ main(int argc, char *const *argv)
}
case 'l':
- if (optarg == NULL || strcmp(optarg, "auto") == 0)
+ if (optarg == NULL || streq(optarg, "auto"))
log_colorize = LOG_COLORIZE_AUTO;
- else if (strcmp(optarg, "never") == 0)
+ else if (streq(optarg, "never"))
log_colorize = LOG_COLORIZE_NEVER;
- else if (strcmp(optarg, "always") == 0)
+ else if (streq(optarg, "always"))
log_colorize = LOG_COLORIZE_ALWAYS;
else {
fprintf(stderr, "%s: argument must be one of 'never', 'always' or 'auto'\n", optarg);
@@ -419,7 +419,7 @@ main(int argc, char *const *argv)
if (resolved_path_cwd != NULL &&
resolved_path_pwd != NULL &&
- strcmp(resolved_path_cwd, resolved_path_pwd) == 0)
+ streq(resolved_path_cwd, resolved_path_pwd))
{
/*
* The resolved path of $PWD matches the resolved path of