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

4
osc.c
View file

@ -426,7 +426,7 @@ osc_set_pwd(struct terminal *term, char *string)
return;
}
if (strcmp(scheme, "file") == 0 && hostname_is_localhost(host)) {
if (streq(scheme, "file") && hostname_is_localhost(host)) {
LOG_DBG("OSC7: pwd: %s", path);
free(term->cwd);
term->cwd = path;
@ -483,7 +483,7 @@ osc_uri(struct terminal *term, char *string)
const char *value = operator + 1;
if (strcmp(key, "id") == 0)
if (streq(key, "id"))
id = sdbm_hash(value);
}