util: add streq() function and use in place of strcmp(...) == 0

This commit is contained in:
Craig Barnes 2024-01-24 23:17:28 +00:00 committed by Daniel Eklöf
parent 44c0cf594b
commit e0f3703ae6
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
16 changed files with 172 additions and 165 deletions

6
uri.c
View file

@ -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)));
}