summaryrefslogtreecommitdiffstats
path: root/test/objcopy_ref.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/objcopy_ref.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/objcopy_ref.c')
-rw-r--r--test/objcopy_ref.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/objcopy_ref.c b/test/objcopy_ref.c
index 22022f2..33f8900 100644
--- a/test/objcopy_ref.c
+++ b/test/objcopy_ref.c
@@ -887,7 +887,7 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
/* Iterate over all elements, calling memcmp() for each */
for (elmt = 0; elmt < nelmts; elmt++) {
- if (HDmemcmp(memb1, memb2, memb_size))
+ if (HDmemcmp(memb1, memb2, memb_size) != 0)
TEST_ERROR
/* Update member pointers */
@@ -1035,7 +1035,7 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts,
else
TEST_ERROR
} /* end else */
- else if (HDmemcmp(buf1, buf2, (elmt_size * nelmts)))
+ else if (HDmemcmp(buf1, buf2, (elmt_size * nelmts)) != 0)
TEST_ERROR
/* Data should be the same. :-) */
@@ -1306,7 +1306,7 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags)
if (H5Lget_name_by_idx(gid2, ".", H5_INDEX_NAME, H5_ITER_INC, idx, objname2,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(objname, objname2))
+ if (HDstrcmp(objname, objname2) != 0)
TEST_ERROR
/* Get link info */
@@ -1420,7 +1420,7 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags)
TEST_ERROR
/* Compare link data */
- if (HDmemcmp(linkval, linkval2, linfo.u.val_size))
+ if (HDmemcmp(linkval, linkval2, linfo.u.val_size) != 0)
TEST_ERROR
} /* end else-if */
else {