summaryrefslogtreecommitdiffstats
path: root/src/strindex.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-07-02 13:56:21 -0400
committerDavid Robillard <d@drobilla.net>2021-07-17 19:58:17 -0400
commit0945afa159d0da327d4da8d2c4e7d345d308cd97 (patch)
treeb7a8ff9a111ec53cfc0d07d933be968a8a9a8787 /src/strindex.c
parent5942e985c6ac9b18090ec92b11aa8a586b6365c5 (diff)
downloadzix-0945afa159d0da327d4da8d2c4e7d345d308cd97.tar.gz
zix-0945afa159d0da327d4da8d2c4e7d345d308cd97.tar.bz2
zix-0945afa159d0da327d4da8d2c4e7d345d308cd97.zip
Avoid allegedly "suspicious" string comparisons
I guess these are suspicious if you've never seen C before?
Diffstat (limited to 'src/strindex.c')
-rw-r--r--src/strindex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/strindex.c b/src/strindex.c
index 9a6d952..f800210 100644
--- a/src/strindex.c
+++ b/src/strindex.c
@@ -226,7 +226,7 @@ zix_strindex_find(ZixStrindex* strindex, const char* const str, char** match)
assert((*match)[0] == orig_p[0]);
}
- if (strncmp(p, label_first, max_len)) {
+ if (!!strncmp(p, label_first, max_len)) {
/* no match */
*match = NULL;
return ZIX_STATUS_NOT_FOUND;