From e0f3703ae6c4084f9275cfc78d87e5604cc27a10 Mon Sep 17 00:00:00 2001 From: Craig Barnes Date: Wed, 24 Jan 2024 23:17:28 +0000 Subject: util: add streq() function and use in place of strcmp(...) == 0 --- uri.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'uri.c') 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))); } -- cgit v1.3