diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/.clang-tidy | 1 | ||||
-rw-r--r-- | test/strindex_test.c | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/test/.clang-tidy b/test/.clang-tidy index 036a68c..4d7a003 100644 --- a/test/.clang-tidy +++ b/test/.clang-tidy @@ -5,7 +5,6 @@ Checks: > -android-cloexec-fopen, -bugprone-reserved-identifier, -bugprone-suspicious-include, - -bugprone-suspicious-string-compare, -cert-dcl37-c, -cert-dcl51-cpp, -clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling, diff --git a/test/strindex_test.c b/test/strindex_test.c index 3cdfb25..bd6a389 100644 --- a/test/strindex_test.c +++ b/test/strindex_test.c @@ -52,7 +52,7 @@ main(void) "No match for substring at %" PRIuPTR " length %" PRIuPTR "\n", i, l); } - if (strncmp(str + i, match, l)) { + if (!!strncmp(str + i, match, l)) { return test_fail("Bad match for substring at %" PRIuPTR " length %" PRIuPTR "\n", i, |