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

View file

@ -685,7 +685,7 @@ urls_assign_key_combos(const struct config *conf, url_list_t *urls)
break;
if (it->item.id == it2->item.id &&
strcmp(it->item.url, it2->item.url) == 0)
streq(it->item.url, it2->item.url))
{
id_already_seen = true;
break;
@ -704,7 +704,7 @@ urls_assign_key_combos(const struct config *conf, url_list_t *urls)
if (&it->item == &it2->item)
break;
if (strcmp(it->item.url, it2->item.url) == 0) {
if (streq(it->item.url, it2->item.url)) {
it->item.key = xc32dup(it2->item.key);
url_already_seen = true;
break;