diff options
author | Sean McBride <sean@rogue-research.com> | 2021-03-10 18:42:35 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-10 18:42:35 (GMT) |
commit | d7b40604ef43c0617ba93369983657d77d9e976a (patch) | |
tree | ae6eef7cd8a34f3667b585ca37c290fb0cc97fce /src/H5B2cache.c | |
parent | a7a013782f0af93f511142b5d167c2bc8ca8505d (diff) | |
download | hdf5-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 'src/H5B2cache.c')
-rw-r--r-- | src/H5B2cache.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/H5B2cache.c b/src/H5B2cache.c index d70816d..e333d61 100644 --- a/src/H5B2cache.c +++ b/src/H5B2cache.c @@ -250,7 +250,7 @@ H5B2__cache_hdr_deserialize(const void *_image, size_t H5_ATTR_UNUSED len, void HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "allocation failed for B-tree header") /* Magic number */ - if (HDmemcmp(image, H5B2_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) + if (HDmemcmp(image, H5B2_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0) HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, NULL, "wrong B-tree header signature") image += H5_SIZEOF_MAGIC; @@ -648,7 +648,7 @@ H5B2__cache_int_deserialize(const void *_image, size_t H5_ATTR_UNUSED len, void internal->shadow_epoch = udata->hdr->shadow_epoch; /* Magic number */ - if (HDmemcmp(image, H5B2_INT_MAGIC, (size_t)H5_SIZEOF_MAGIC)) + if (HDmemcmp(image, H5B2_INT_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0) HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, NULL, "wrong B-tree internal node signature") image += H5_SIZEOF_MAGIC; @@ -1064,7 +1064,7 @@ H5B2__cache_leaf_deserialize(const void *_image, size_t H5_ATTR_UNUSED len, void leaf->shadow_epoch = udata->hdr->shadow_epoch; /* Magic number */ - if (HDmemcmp(image, H5B2_LEAF_MAGIC, (size_t)H5_SIZEOF_MAGIC)) + if (HDmemcmp(image, H5B2_LEAF_MAGIC, (size_t)H5_SIZEOF_MAGIC) != 0) HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, NULL, "wrong B-tree leaf node signature") image += H5_SIZEOF_MAGIC; |