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

2
log.c
View file

@ -199,7 +199,7 @@ log_level_from_string(const char *str)
return -1;
for (int i = 0, n = map_len(); i < n; i++)
if (strcmp(str, log_level_map[i].name) == 0)
if (streq(str, log_level_map[i].name))
return i;
return -1;