From 0945afa159d0da327d4da8d2c4e7d345d308cd97 Mon Sep 17 00:00:00 2001
From: David Robillard <d@drobilla.net>
Date: Fri, 2 Jul 2021 13:56:21 -0400
Subject: Avoid allegedly "suspicious" string comparisons

I guess these are suspicious if you've never seen C before?
---
 src/strindex.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src')

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;
-- 
cgit v1.2.1