aboutsummaryrefslogtreecommitdiff
path: root/selection.c
diff options
context:
space:
mode:
authorCraig Barnes <craigbarnes@protonmail.com>2024-01-24 23:17:28 +0000
committerDaniel Eklöf <daniel@ekloef.se>2024-02-05 11:09:52 +0000
commite0f3703ae6c4084f9275cfc78d87e5604cc27a10 (patch)
treecdfeebf67f6bb962c5543337b952fe6cf9d40587 /selection.c
parentcsi: simplify handling of Set/Reset Mode (SM/RM) sequences (diff)
util: add streq() function and use in place of strcmp(...) == 0
Diffstat (limited to 'selection.c')
-rw-r--r--selection.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/selection.c b/selection.c
index 50e41637..9e9bbb10 100644
--- a/selection.c
+++ b/selection.c
@@ -2080,7 +2080,7 @@ decode_one_uri(struct clipboard_receive *ctx, char *uri, size_t len)
ctx->cb(" ", 1, ctx->user);
ctx->add_space = true;
- if (strcmp(scheme, "file") == 0 && hostname_is_localhost(host)) {
+ if (streq(scheme, "file") && hostname_is_localhost(host)) {
if (ctx->quote_paths)
ctx->cb("'", 1, ctx->user);
@@ -2534,7 +2534,7 @@ select_mime_type_for_offer(const char *_mime_type,
if (mime_type_map[i] == NULL)
continue;
- if (strcmp(_mime_type, mime_type_map[i]) == 0) {
+ if (streq(_mime_type, mime_type_map[i])) {
mime_type = i;
break;
}