mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-30 11:10:23 -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
4
osc.c
4
osc.c
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue