aboutsummaryrefslogtreecommitdiff
path: root/uri.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 /uri.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 'uri.c')
-rw-r--r--uri.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/uri.c b/uri.c
index 7214a479..4de4bd88 100644
--- a/uri.c
+++ b/uri.c
@@ -250,7 +250,7 @@ hostname_is_localhost(const char *hostname)
this_host[0] = '\0';
return (hostname != NULL && (
- strcmp(hostname, "") == 0 ||
- strcmp(hostname, "localhost") == 0 ||
- strcmp(hostname, this_host) == 0));
+ streq(hostname, "") ||
+ streq(hostname, "localhost") ||
+ streq(hostname, this_host)));
}