mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-04 07:15:29 -04:00
util: add streq() function and use in place of strcmp(...) == 0
This commit is contained in:
parent
44c0cf594b
commit
e0f3703ae6
16 changed files with 172 additions and 165 deletions
6
uri.c
6
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)));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue