summaryrefslogtreecommitdiffstats
path: root/test/ttst.c
diff options
context:
space:
mode:
authorSean McBride <sean@rogue-research.com>2021-03-10 18:42:35 (GMT)
committerGitHub <noreply@github.com>2021-03-10 18:42:35 (GMT)
commitd7b40604ef43c0617ba93369983657d77d9e976a (patch)
treeae6eef7cd8a34f3667b585ca37c290fb0cc97fce /test/ttst.c
parenta7a013782f0af93f511142b5d167c2bc8ca8505d (diff)
downloadhdf5-d7b40604ef43c0617ba93369983657d77d9e976a.zip
hdf5-d7b40604ef43c0617ba93369983657d77d9e976a.tar.gz
hdf5-d7b40604ef43c0617ba93369983657d77d9e976a.tar.bz2
Fixed all clang-tidy bugprone-suspicious-string-compare warnings (#451)
* Fixed all clang-tidy bugprone-suspicious-string-compare warnings This change was generated entirely by clang-tidy itself. * Reformat code with clang v10.0.1. Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
Diffstat (limited to 'test/ttst.c')
-rw-r--r--test/ttst.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/ttst.c b/test/ttst.c
index 53aab5e..07f118c 100644
--- a/test/ttst.c
+++ b/test/ttst.c
@@ -204,14 +204,14 @@ test_tst_insert(void)
found = H5ST_find(tree, uniq_words[u]);
CHECK_PTR(found, "H5ST_find");
- if (HDstrcmp((const char *)found->eqkid, uniq_words[u]))
+ if (HDstrcmp((const char *)found->eqkid, uniq_words[u]) != 0)
TestErrPrintf("%d: TST node values don't match!, found->eqkid=%s, uniq_words[%u]=%s\n", __LINE__,
(char *)found->eqkid, (unsigned)u, uniq_words[u]);
obj = H5ST_locate(tree, uniq_words[u]);
CHECK_PTR(obj, "H5ST_locate");
- if (HDstrcmp((const char *)obj, uniq_words[u]))
+ if (HDstrcmp((const char *)obj, uniq_words[u]) != 0)
TestErrPrintf("%d: TST objects don't match!, obj=%s, uniq_words[%u]=%s\n", __LINE__, (char *)obj,
(unsigned)u, uniq_words[u]);
} /* end for */
@@ -262,7 +262,7 @@ test_tst_iterate(void)
u = 0;
do {
/* Check that the strings in the TST are in the correct order */
- if (HDstrcmp((const char *)found->eqkid, sort_uniq_words[u]))
+ if (HDstrcmp((const char *)found->eqkid, sort_uniq_words[u]) != 0)
TestErrPrintf("%d: TST node values don't match!, found->eqkid=%s, sort_uniq_words[%u]=%s\n",
__LINE__, (char *)found->eqkid, (unsigned)u, sort_uniq_words[u]);
@@ -311,7 +311,7 @@ test_tst_remove(void)
CHECK_PTR(obj, "H5ST_remove");
/* Check that the correct string was removed from TST */
- if (HDstrcmp((const char *)obj, rand_uniq_words[u]))
+ if (HDstrcmp((const char *)obj, rand_uniq_words[u]) != 0)
TestErrPrintf("%d: TST node values don't match!, obj=%s, rand_uniq_words[%u]=%s\n", __LINE__,
(char *)obj, (unsigned)u, rand_uniq_words[u]);
@@ -333,7 +333,7 @@ test_tst_remove(void)
CHECK_PTR(found, "H5ST_find");
/* Check that the correct object will be removed from TST */
- if (HDstrcmp((const char *)found->eqkid, rand_uniq_words[u]))
+ if (HDstrcmp((const char *)found->eqkid, rand_uniq_words[u]) != 0)
TestErrPrintf("%d: TST node values don't match!, found->eqkid=%s, rand_uniq_words[%u]=%s\n",
__LINE__, (char *)found->eqkid, (unsigned)u, rand_uniq_words[u]);