summaryrefslogtreecommitdiffstats
path: root/test/objcopy.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.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.c')
-rw-r--r--test/objcopy.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/test/objcopy.c b/test/objcopy.c
index 717427a..4b076ba 100644
--- a/test/objcopy.c
+++ b/test/objcopy.c
@@ -1103,7 +1103,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 */
@@ -1325,7 +1325,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. :-) */
@@ -1596,7 +1596,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 */
@@ -1710,7 +1710,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 {
@@ -7025,7 +7025,7 @@ compare_attribute_compound_vlstr(hid_t loc, hid_t loc2)
FAIL_STACK_ERROR
if (HDstrlen(rbuf.v) != HDstrlen(rbuf2.v))
FAIL_STACK_ERROR
- if (HDmemcmp(rbuf.v, rbuf2.v, HDstrlen(rbuf.v)))
+ if (HDmemcmp(rbuf.v, rbuf2.v, HDstrlen(rbuf.v)) != 0)
FAIL_STACK_ERROR
/* Reclaim vlen buffer */
@@ -11695,9 +11695,9 @@ test_copy_null_ref(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fap
TEST_ERROR
/* Verify that the references contain only "0" bytes */
- if (HDmemcmp(obj_buf, zeros, sizeof(obj_buf)))
+ if (HDmemcmp(obj_buf, zeros, sizeof(obj_buf)) != 0)
TEST_ERROR
- if (HDmemcmp(reg_buf, zeros, sizeof(reg_buf)))
+ if (HDmemcmp(reg_buf, zeros, sizeof(reg_buf)) != 0)
TEST_ERROR
/* Close datasets */
@@ -11740,9 +11740,9 @@ test_copy_null_ref(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fap
TEST_ERROR
/* Verify that the references contain only "0" bytes */
- if (HDmemcmp(obj_buf, zeros, sizeof(obj_buf)))
+ if (HDmemcmp(obj_buf, zeros, sizeof(obj_buf)) != 0)
TEST_ERROR
- if (HDmemcmp(reg_buf, zeros, sizeof(reg_buf)))
+ if (HDmemcmp(reg_buf, zeros, sizeof(reg_buf)) != 0)
TEST_ERROR
/* Close */
@@ -11902,9 +11902,9 @@ test_copy_null_ref_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t ds
TEST_ERROR
/* Verify that the references contain only "0" bytes */
- if (HDmemcmp(obj_buf, zeros, sizeof(obj_buf)))
+ if (HDmemcmp(obj_buf, zeros, sizeof(obj_buf)) != 0)
TEST_ERROR
- if (HDmemcmp(reg_buf, zeros, sizeof(reg_buf)))
+ if (HDmemcmp(reg_buf, zeros, sizeof(reg_buf)) != 0)
TEST_ERROR
/* Create destination file */
@@ -11947,9 +11947,9 @@ test_copy_null_ref_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t ds
TEST_ERROR
/* Verify that the references contain only "0" bytes */
- if (HDmemcmp(obj_buf, zeros, sizeof(obj_buf)))
+ if (HDmemcmp(obj_buf, zeros, sizeof(obj_buf)) != 0)
TEST_ERROR
- if (HDmemcmp(reg_buf, zeros, sizeof(reg_buf)))
+ if (HDmemcmp(reg_buf, zeros, sizeof(reg_buf)) != 0)
TEST_ERROR
/* Close */