summaryrefslogtreecommitdiffstats
path: root/test/links.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/links.c')
-rw-r--r--test/links.c279
1 files changed, 146 insertions, 133 deletions
diff --git a/test/links.c b/test/links.c
index 51cadaf..2ac2e28 100644
--- a/test/links.c
+++ b/test/links.c
@@ -631,6 +631,8 @@ cklinks(hid_t fapl, hbool_t new_format)
if ((file = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0)
FAIL_STACK_ERROR
+ //! [H5Otoken_cmp_snip]
+
/* Hard link */
if (H5Oget_info_by_name3(file, "d1", &oinfo1, H5O_INFO_BASIC, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR
@@ -641,6 +643,9 @@ cklinks(hid_t fapl, hbool_t new_format)
HDprintf(" %d: Unexpected object type should have been a dataset\n", __LINE__);
TEST_ERROR
} /* end if */
+
+ //! [H5Otoken_cmp_snip]
+
if (H5Otoken_cmp(file, &oinfo1.token, &oinfo2.token, &token_cmp) < 0)
FAIL_STACK_ERROR
if (token_cmp) {
@@ -698,7 +703,7 @@ cklinks(hid_t fapl, hbool_t new_format)
} /* end if */
if (H5Lget_val(file, "grp1/soft", linkval, sizeof linkval, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR
- if (HDstrcmp(linkval, "/d1")) {
+ if (HDstrcmp(linkval, "/d1") != 0) {
H5_FAILED();
HDputs(" Soft link test failed. Wrong link value");
TEST_ERROR
@@ -729,7 +734,7 @@ cklinks(hid_t fapl, hbool_t new_format)
HDprintf(" %d: Can't retrieve link value\n", __LINE__);
TEST_ERROR
} /* end if */
- if (HDstrcmp(linkval, "foobar")) {
+ if (HDstrcmp(linkval, "foobar") != 0) {
H5_FAILED();
HDputs(" Dangling link test failed. Wrong link value");
TEST_ERROR
@@ -760,7 +765,7 @@ cklinks(hid_t fapl, hbool_t new_format)
HDprintf(" %d: Can't retrieve link value\n", __LINE__);
TEST_ERROR
} /* end if */
- if (HDstrcmp(linkval, "/grp1/recursive")) {
+ if (HDstrcmp(linkval, "/grp1/recursive") != 0) {
H5_FAILED();
HDputs(" Recursive link test failed. Wrong link value");
TEST_ERROR
@@ -1059,7 +1064,7 @@ toomany(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/hard21"))
+ if (HDstrcmp(objname, "/hard21") != 0)
TEST_ERROR
/* Create object in hard-linked group */
@@ -1093,7 +1098,7 @@ toomany(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/soft16"))
+ if (HDstrcmp(objname, "/soft16") != 0)
TEST_ERROR
/* Create object using soft links */
@@ -1962,7 +1967,7 @@ test_deprec(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR
if (H5Gget_comment(file_id, "group1", sizeof(tmpstr), tmpstr) < 0)
FAIL_STACK_ERROR
- if (HDstrcmp(tmpstr, "comment"))
+ if (HDstrcmp(tmpstr, "comment") != 0)
TEST_ERROR
/* Create links using H5Glink and H5Glink2 */
@@ -1978,7 +1983,7 @@ test_deprec(hid_t fapl, hbool_t new_format)
/* Test getting the names for objects */
if (H5Gget_objname_by_idx(group1_id, (hsize_t)0, tmpstr, sizeof(tmpstr)) < 0)
FAIL_STACK_ERROR
- if (HDstrcmp(tmpstr, "link_to_group2"))
+ if (HDstrcmp(tmpstr, "link_to_group2") != 0)
TEST_ERROR
H5E_BEGIN_TRY
{
@@ -2015,7 +2020,7 @@ test_deprec(hid_t fapl, hbool_t new_format)
if (H5Gget_objinfo(file_id, "/group1/link_to_group2", TRUE, &sb_hard2) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(&sb_hard1.objno, sb_hard2.objno, sizeof(sb_hard1.objno))) {
+ if (HDmemcmp(&sb_hard1.objno, sb_hard2.objno, sizeof(sb_hard1.objno)) != 0) {
H5_FAILED();
HDputs(" Hard link test failed. Link seems not to point to the ");
HDputs(" expected file location.");
@@ -2028,7 +2033,7 @@ test_deprec(hid_t fapl, hbool_t new_format)
if (H5Gget_objinfo(file_id, "/group2/link_to_group1", TRUE, &sb_hard2) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(&sb_hard1.objno, sb_hard2.objno, sizeof(sb_hard1.objno))) {
+ if (HDmemcmp(&sb_hard1.objno, sb_hard2.objno, sizeof(sb_hard1.objno)) != 0) {
H5_FAILED();
HDputs(" Hard link test failed. Link seems not to point to the ");
HDputs(" expected file location.");
@@ -2045,7 +2050,7 @@ test_deprec(hid_t fapl, hbool_t new_format)
if (H5Gget_linkval(group2_id, "soft_link_to_group1", sb_soft1.linklen, tmpstr) < 0)
FAIL_STACK_ERROR
- if (HDstrcmp("link_to_group1", tmpstr))
+ if (HDstrcmp("link_to_group1", tmpstr) != 0)
TEST_ERROR
/* Test non-existing links with H5Gget_objinfo */
@@ -2066,7 +2071,7 @@ test_deprec(hid_t fapl, hbool_t new_format)
if (H5Gget_linkval(group2_id, "dangle_soft_link", sb_soft2.linklen, tmpstr) < 0)
FAIL_STACK_ERROR
- if (HDstrcmp("dangle", tmpstr))
+ if (HDstrcmp("dangle", tmpstr) != 0)
TEST_ERROR
/* Test H5Gmove and H5Gmove2 */
@@ -2213,7 +2218,7 @@ cklinks_deprec(hid_t fapl, hbool_t new_format)
} /* end if */
if (H5Lget_val(file, "grp1/soft", linkval, sizeof linkval, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR
- if (HDstrcmp(linkval, "/d1")) {
+ if (HDstrcmp(linkval, "/d1") != 0) {
H5_FAILED();
HDputs(" Soft link test failed. Wrong link value");
TEST_ERROR
@@ -2244,7 +2249,7 @@ cklinks_deprec(hid_t fapl, hbool_t new_format)
HDprintf(" %d: Can't retrieve link value\n", __LINE__);
TEST_ERROR
} /* end if */
- if (HDstrcmp(linkval, "foobar")) {
+ if (HDstrcmp(linkval, "foobar") != 0) {
H5_FAILED();
HDputs(" Dangling link test failed. Wrong link value");
TEST_ERROR
@@ -2275,7 +2280,7 @@ cklinks_deprec(hid_t fapl, hbool_t new_format)
HDprintf(" %d: Can't retrieve link value\n", __LINE__);
TEST_ERROR
} /* end if */
- if (HDstrcmp(linkval, "/grp1/recursive")) {
+ if (HDstrcmp(linkval, "/grp1/recursive") != 0) {
H5_FAILED();
HDputs(" Recursive link test failed. Wrong link value");
TEST_ERROR
@@ -2812,12 +2817,12 @@ external_link_root_deprec(hid_t fapl, hbool_t new_format)
TEST_ERROR
if (H5Lunpack_elink_val(objname, linfo.u.val_size, NULL, &file, &path) < 0)
TEST_ERROR
- if (HDstrcmp(file, filename1)) {
+ if (HDstrcmp(file, filename1) != 0) {
H5_FAILED();
HDputs(" External link file name incorrect");
goto error;
}
- if (HDstrcmp(path, "/")) {
+ if (HDstrcmp(path, "/") != 0) {
H5_FAILED();
HDputs(" External link path incorrect");
goto error;
@@ -2840,12 +2845,12 @@ external_link_root_deprec(hid_t fapl, hbool_t new_format)
TEST_ERROR
if (H5Lunpack_elink_val(objname, linfo.u.val_size, NULL, &file, &path) < 0)
TEST_ERROR
- if (HDstrcmp(file, filename1)) {
+ if (HDstrcmp(file, filename1) != 0) {
H5_FAILED();
HDputs(" External link file name incorrect");
goto error;
}
- if (HDstrcmp(path, "/")) {
+ if (HDstrcmp(path, "/") != 0) {
H5_FAILED();
HDputs(" External link path incorrect");
goto error;
@@ -2864,7 +2869,7 @@ external_link_root_deprec(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/"))
+ if (HDstrcmp(objname, "/") != 0)
TEST_ERROR
/* Create object in external file */
@@ -2909,11 +2914,11 @@ external_link_root_deprec(hid_t fapl, hbool_t new_format)
/* Check names */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/new_group"))
+ if (HDstrcmp(objname, "/new_group") != 0)
TEST_ERROR
if (H5Iget_name(gid2, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/newer_group"))
+ if (HDstrcmp(objname, "/newer_group") != 0)
TEST_ERROR
/* Close opened objects */
@@ -3061,9 +3066,9 @@ external_link_query_deprec(hid_t fapl, hbool_t new_format)
TEST_ERROR
/* Compare the file and object names */
- if (HDstrcmp(file_name, filename2))
+ if (HDstrcmp(file_name, filename2) != 0)
TEST_ERROR
- if (HDstrcmp(object_name, "/dst"))
+ if (HDstrcmp(object_name, "/dst") != 0)
TEST_ERROR
/* Query information about object that external link points to */
@@ -3257,7 +3262,7 @@ external_link_closing_deprec(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR
if (H5Oget_comment_by_name(fid1, "elink/elink/elink/group1_moved", buf, sizeof(buf), H5P_DEFAULT) < 0)
FAIL_STACK_ERROR
- if (HDstrcmp(buf, "comment"))
+ if (HDstrcmp(buf, "comment") != 0)
TEST_ERROR
/* Test H5*open */
@@ -3674,7 +3679,7 @@ ud_hard_links_deprec(hid_t fapl)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/group"))
+ if (HDstrcmp(objname, "/group") != 0)
TEST_ERROR
/* Create object in group */
@@ -3694,7 +3699,7 @@ ud_hard_links_deprec(hid_t fapl)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/group/new_group"))
+ if (HDstrcmp(objname, "/group/new_group") != 0)
TEST_ERROR
/* Close opened object */
@@ -3857,7 +3862,7 @@ ud_link_reregister_deprec(hid_t fapl)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/" REREG_TARGET_NAME))
+ if (HDstrcmp(objname, "/" REREG_TARGET_NAME) != 0)
TEST_ERROR
/* Create object in group */
@@ -3877,7 +3882,7 @@ ud_link_reregister_deprec(hid_t fapl)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/rereg_target/new_group"))
+ if (HDstrcmp(objname, "/rereg_target/new_group") != 0)
TEST_ERROR
/* Close opened object */
@@ -4221,7 +4226,7 @@ lapl_nlinks_deprec(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/soft17"))
+ if (HDstrcmp(objname, "/soft17") != 0)
TEST_ERROR
/* Create group using soft link */
@@ -4265,7 +4270,7 @@ lapl_nlinks_deprec(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/soft4"))
+ if (HDstrcmp(objname, "/soft4") != 0)
TEST_ERROR
/* Test other functions that should use a LAPL */
@@ -4880,7 +4885,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, n, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(valname, tmpval))
+ if (HDstrcmp(valname, tmpval) != 0)
TEST_ERROR
} /* end if */
@@ -4889,7 +4894,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, n, tmpname, (size_t)NAME_BUF_SIZE,
H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(linkname, tmpname))
+ if (HDstrcmp(linkname, tmpname) != 0)
TEST_ERROR
/* Don't test "native" order if there is no creation order index, since
@@ -4919,7 +4924,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_NATIVE, n, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(valname, tmpval))
+ if (HDstrcmp(valname, tmpval) != 0)
TEST_ERROR
} /* end if */
@@ -4928,7 +4933,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_NATIVE, n, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(linkname, tmpname))
+ if (HDstrcmp(linkname, tmpname) != 0)
TEST_ERROR
} /* end if */
@@ -4953,7 +4958,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, (hsize_t)0, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(valname, tmpval))
+ if (HDstrcmp(valname, tmpval) != 0)
TEST_ERROR
} /* end if */
@@ -4962,7 +4967,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(linkname, tmpname))
+ if (HDstrcmp(linkname, tmpname) != 0)
TEST_ERROR
/* Verify the link information for first link, in increasing link name order */
@@ -4985,7 +4990,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, n, tmpval, (size_t)NAME_BUF_SIZE,
H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(valname, tmpval))
+ if (HDstrcmp(valname, tmpval) != 0)
TEST_ERROR
} /* end if */
@@ -4994,7 +4999,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, n, tmpname, (size_t)NAME_BUF_SIZE,
H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(linkname, tmpname))
+ if (HDstrcmp(linkname, tmpname) != 0)
TEST_ERROR
/* Don't test "native" order queries on link name order, since there's not
@@ -5021,7 +5026,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)0, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(valname, tmpval))
+ if (HDstrcmp(valname, tmpval) != 0)
TEST_ERROR
} /* end if */
@@ -5030,7 +5035,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(linkname, tmpname))
+ if (HDstrcmp(linkname, tmpname) != 0)
TEST_ERROR
/* Success */
@@ -5377,7 +5382,7 @@ link_info_by_idx_old_deprec(hid_t fapl)
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)u, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(valname, tmpval))
+ if (HDstrcmp(valname, tmpval) != 0)
TEST_ERROR
} /* end else */
@@ -5385,7 +5390,7 @@ link_info_by_idx_old_deprec(hid_t fapl)
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)u, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(objname, tmpname))
+ if (HDstrcmp(objname, tmpname) != 0)
TEST_ERROR
/* Verify link information (in native order - native is increasing) */
@@ -5400,7 +5405,7 @@ link_info_by_idx_old_deprec(hid_t fapl)
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_NATIVE, (hsize_t)u, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(valname, tmpval))
+ if (HDstrcmp(valname, tmpval) != 0)
TEST_ERROR
} /* end else */
@@ -5408,7 +5413,7 @@ link_info_by_idx_old_deprec(hid_t fapl)
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_NATIVE, (hsize_t)u, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(objname, tmpname))
+ if (HDstrcmp(objname, tmpname) != 0)
TEST_ERROR
/* Make link name for decreasing order queries */
@@ -5429,7 +5434,7 @@ link_info_by_idx_old_deprec(hid_t fapl)
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)u, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(valname, tmpval))
+ if (HDstrcmp(valname, tmpval) != 0)
TEST_ERROR
} /* end else */
@@ -5437,7 +5442,7 @@ link_info_by_idx_old_deprec(hid_t fapl)
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)u, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(objname, tmpname))
+ if (HDstrcmp(objname, tmpname) != 0)
TEST_ERROR
} /* end for */
@@ -5663,7 +5668,7 @@ delete_by_idx_deprec(hid_t fapl)
HDsnprintf(objname, sizeof(objname), "filler %02u", (u + 1));
else
HDsnprintf(objname, sizeof(objname), "filler %02u", (max_compact - (u + 2)));
- if (HDstrcmp(objname, tmpname))
+ if (HDstrcmp(objname, tmpname) != 0)
TEST_ERROR
} /* end for */
@@ -5737,7 +5742,7 @@ delete_by_idx_deprec(hid_t fapl)
HDsnprintf(objname, sizeof(objname), "filler %02u", (u + 1));
else
HDsnprintf(objname, sizeof(objname), "filler %02u", ((max_compact * 2) - (u + 2)));
- if (HDstrcmp(objname, tmpname))
+ if (HDstrcmp(objname, tmpname) != 0)
TEST_ERROR
} /* end for */
@@ -5816,7 +5821,7 @@ delete_by_idx_deprec(hid_t fapl)
else
HDsnprintf(objname, sizeof(objname), "filler %02u",
((max_compact * 2) - ((u * 2) + 2)));
- if (HDstrcmp(objname, tmpname))
+ if (HDstrcmp(objname, tmpname) != 0)
TEST_ERROR
} /* end for */
@@ -5850,7 +5855,7 @@ delete_by_idx_deprec(hid_t fapl)
else
HDsnprintf(objname, sizeof(objname), "filler %02u",
((max_compact * 2) - ((u * 2) + 4)));
- if (HDstrcmp(objname, tmpname))
+ if (HDstrcmp(objname, tmpname) != 0)
TEST_ERROR
} /* end for */
@@ -6017,7 +6022,7 @@ delete_by_idx_old_deprec(hid_t fapl)
HDsnprintf(objname, sizeof(objname), "filler %02u", (u + 1));
else
HDsnprintf(objname, sizeof(objname), "filler %02u", dec_u);
- if (HDstrcmp(objname, tmpname))
+ if (HDstrcmp(objname, tmpname) != 0)
TEST_ERROR
} /* end for */
@@ -6091,7 +6096,7 @@ delete_by_idx_old_deprec(hid_t fapl)
HDsnprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 1));
else
HDsnprintf(objname, sizeof(objname), "filler %02u", dec_u);
- if (HDstrcmp(objname, tmpname))
+ if (HDstrcmp(objname, tmpname) != 0)
TEST_ERROR
} /* end for */
@@ -6125,7 +6130,7 @@ delete_by_idx_old_deprec(hid_t fapl)
HDsnprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 3));
else
HDsnprintf(objname, sizeof(objname), "filler %02u", dec_u);
- if (HDstrcmp(objname, tmpname))
+ if (HDstrcmp(objname, tmpname) != 0)
TEST_ERROR
} /* end for */
@@ -6207,7 +6212,7 @@ link_iterate_deprec_cb(hid_t group_id, const char *link_name, const H5L_info1_t
/* Verify name of link */
HDsnprintf(objname, sizeof(objname), "filler %02u", (unsigned)my_info.corder);
- if (HDstrcmp(link_name, objname))
+ if (HDstrcmp(link_name, objname) != 0)
return H5_ITER_ERROR;
/* Check if we've visited this link before */
@@ -6707,7 +6712,7 @@ link_iterate_old_deprec_cb(hid_t group_id, const char *link_name, const H5L_info
/* Verify name of link */
HDsnprintf(objname, sizeof(objname), "filler %02u",
(info ? (unsigned)op_data->curr : (unsigned)((op_data->ncalled - 1) + op_data->nskipped)));
- if (HDstrcmp(link_name, objname))
+ if (HDstrcmp(link_name, objname) != 0)
return H5_ITER_ERROR;
/* Check if we've visited this link before */
@@ -7130,12 +7135,12 @@ external_link_root(hid_t fapl, hbool_t new_format)
TEST_ERROR
if (H5Lunpack_elink_val(objname, linfo.u.val_size, NULL, &file, &path) < 0)
TEST_ERROR
- if (HDstrcmp(file, filename1)) {
+ if (HDstrcmp(file, filename1) != 0) {
H5_FAILED();
HDputs(" External link file name incorrect");
goto error;
}
- if (HDstrcmp(path, "/")) {
+ if (HDstrcmp(path, "/") != 0) {
H5_FAILED();
HDputs(" External link path incorrect");
goto error;
@@ -7158,12 +7163,12 @@ external_link_root(hid_t fapl, hbool_t new_format)
TEST_ERROR
if (H5Lunpack_elink_val(objname, linfo.u.val_size, NULL, &file, &path) < 0)
TEST_ERROR
- if (HDstrcmp(file, filename1)) {
+ if (HDstrcmp(file, filename1) != 0) {
H5_FAILED();
HDputs(" External link file name incorrect");
goto error;
}
- if (HDstrcmp(path, "/")) {
+ if (HDstrcmp(path, "/") != 0) {
H5_FAILED();
HDputs(" External link path incorrect");
goto error;
@@ -7182,7 +7187,7 @@ external_link_root(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/"))
+ if (HDstrcmp(objname, "/") != 0)
TEST_ERROR
/* Create object in external file */
@@ -7227,11 +7232,11 @@ external_link_root(hid_t fapl, hbool_t new_format)
/* Check names */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/new_group"))
+ if (HDstrcmp(objname, "/new_group") != 0)
TEST_ERROR
if (H5Iget_name(gid2, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/newer_group"))
+ if (HDstrcmp(objname, "/newer_group") != 0)
TEST_ERROR
/* Close opened objects */
@@ -7353,7 +7358,7 @@ external_link_path(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/A/B/C"))
+ if (HDstrcmp(objname, "/A/B/C") != 0)
TEST_ERROR
/* Create object in external file */
@@ -7383,7 +7388,7 @@ external_link_path(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/A/B/C/new_group"))
+ if (HDstrcmp(objname, "/A/B/C/new_group") != 0)
TEST_ERROR
/* Close opened object */
@@ -7525,7 +7530,7 @@ external_link_mult(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/A/B/C"))
+ if (HDstrcmp(objname, "/A/B/C") != 0)
TEST_ERROR
/* Create object in external file */
@@ -7555,7 +7560,7 @@ external_link_mult(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/A/B/C/new_group"))
+ if (HDstrcmp(objname, "/A/B/C/new_group") != 0)
TEST_ERROR
/* Close opened object */
@@ -7671,7 +7676,7 @@ external_link_self(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/X"))
+ if (HDstrcmp(objname, "/X") != 0)
TEST_ERROR
/* Create object through external link */
@@ -7693,7 +7698,7 @@ external_link_self(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/X/new_group"))
+ if (HDstrcmp(objname, "/X/new_group") != 0)
TEST_ERROR
/* Close opened object */
@@ -7878,7 +7883,7 @@ external_link_pingpong(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/final"))
+ if (HDstrcmp(objname, "/final") != 0)
TEST_ERROR
/* Create object in external file */
@@ -7908,7 +7913,7 @@ external_link_pingpong(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/final/new_group"))
+ if (HDstrcmp(objname, "/final/new_group") != 0)
TEST_ERROR
/* Close opened object */
@@ -8070,7 +8075,7 @@ external_link_toomany(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/final"))
+ if (HDstrcmp(objname, "/final") != 0)
TEST_ERROR
/* Create object in external file */
@@ -9841,13 +9846,13 @@ external_set_elink_cb_cb(const char *parent_file, const char *parent_group, cons
set_elink_cb_t *op_data = (set_elink_cb_t *)_op_data;
/* Verify file and object names are correct */
- if (HDstrcmp(parent_file, op_data->parent_file))
+ if (HDstrcmp(parent_file, op_data->parent_file) != 0)
return FAIL;
- if (HDstrcmp(parent_group, "/group1"))
+ if (HDstrcmp(parent_group, "/group1") != 0)
return FAIL;
- if (HDstrcmp(target_file, op_data->target_file))
+ if (HDstrcmp(target_file, op_data->target_file) != 0)
return FAIL;
- if (HDstrcmp(target_obj, "/"))
+ if (HDstrcmp(target_obj, "/") != 0)
return FAIL;
/* Set flags to be read-write */
@@ -11110,9 +11115,9 @@ external_link_query(hid_t fapl, hbool_t new_format)
TEST_ERROR
/* Compare the file and object names */
- if (HDstrcmp(file_name, filename2))
+ if (HDstrcmp(file_name, filename2) != 0)
TEST_ERROR
- if (HDstrcmp(object_name, "/dst"))
+ if (HDstrcmp(object_name, "/dst") != 0)
TEST_ERROR
/* Query information about object that external link points to */
@@ -11509,7 +11514,7 @@ external_link_move(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
FAIL_STACK_ERROR
- if (HDstrcmp(objname, "/dst"))
+ if (HDstrcmp(objname, "/dst") != 0)
TEST_ERROR
/* Create object in external file */
@@ -11569,7 +11574,7 @@ external_link_move(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
FAIL_STACK_ERROR
- if (HDstrcmp(objname, "/dst"))
+ if (HDstrcmp(objname, "/dst") != 0)
TEST_ERROR
/* Create object in external file */
@@ -11616,7 +11621,7 @@ external_link_move(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
FAIL_STACK_ERROR
- if (HDstrcmp(objname, "/dst"))
+ if (HDstrcmp(objname, "/dst") != 0)
TEST_ERROR
/* Move external link back to original location */
@@ -11626,7 +11631,7 @@ external_link_move(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
FAIL_STACK_ERROR
- if (HDstrcmp(objname, "/dst"))
+ if (HDstrcmp(objname, "/dst") != 0)
TEST_ERROR
/* Create object in external file */
@@ -11800,7 +11805,7 @@ external_link_ride(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/dst"))
+ if (HDstrcmp(objname, "/dst") != 0)
TEST_ERROR
/* Create object in external file */
@@ -11849,7 +11854,7 @@ external_link_ride(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/dst"))
+ if (HDstrcmp(objname, "/dst") != 0)
TEST_ERROR
/* Create object in external file */
@@ -12042,7 +12047,7 @@ external_link_closing(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR
if (H5Oget_comment_by_name(fid1, "elink/elink/elink/group1_moved", buf, sizeof(buf), H5P_DEFAULT) < 0)
FAIL_STACK_ERROR
- if (HDstrcmp(buf, "comment"))
+ if (HDstrcmp(buf, "comment") != 0)
TEST_ERROR
/* Test H5*open */
@@ -12385,7 +12390,7 @@ external_link_strong(hid_t fapl, hbool_t new_format)
FAIL_STACK_ERROR
if (H5Iget_name(gid2, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/A/B/C"))
+ if (HDstrcmp(objname, "/A/B/C") != 0)
TEST_ERROR
if (H5Gclose(gid2) < 0)
TEST_ERROR
@@ -13953,7 +13958,7 @@ ud_hard_links(hid_t fapl)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/group"))
+ if (HDstrcmp(objname, "/group") != 0)
TEST_ERROR
/* Create object in group */
@@ -13973,7 +13978,7 @@ ud_hard_links(hid_t fapl)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/group/new_group"))
+ if (HDstrcmp(objname, "/group/new_group") != 0)
TEST_ERROR
/* Close opened object */
@@ -14164,7 +14169,7 @@ ud_link_reregister(hid_t fapl)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/" REREG_TARGET_NAME))
+ if (HDstrcmp(objname, "/" REREG_TARGET_NAME) != 0)
TEST_ERROR
/* Create object in group */
@@ -14184,7 +14189,7 @@ ud_link_reregister(hid_t fapl)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/rereg_target/new_group"))
+ if (HDstrcmp(objname, "/rereg_target/new_group") != 0)
TEST_ERROR
/* Close opened object */
@@ -14273,9 +14278,9 @@ UD_cb_create(const char *link_name, hid_t loc_group, const void *udata, size_t u
if (lcpl_id < 0)
TEST_ERROR
- if (HDstrcmp(link_name, UD_CB_LINK_NAME) && strcmp(link_name, NEW_UD_CB_LINK_NAME))
+ if (HDstrcmp(link_name, UD_CB_LINK_NAME) != 0 && HDstrcmp(link_name, NEW_UD_CB_LINK_NAME) != 0)
TEST_ERROR
- if (HDstrcmp((const char *)udata, UD_CB_TARGET))
+ if (HDstrcmp((const char *)udata, UD_CB_TARGET) != 0)
TEST_ERROR
if (udata_size != UD_CB_TARGET_LEN)
TEST_ERROR
@@ -14300,9 +14305,9 @@ UD_cb_traverse(const char *link_name, hid_t cur_group, const void *udata, size_t
if (udata_size > 0 && !udata)
TEST_ERROR
- if (HDstrcmp(link_name, UD_CB_LINK_NAME) && strcmp(link_name, NEW_UD_CB_LINK_NAME))
+ if (HDstrcmp(link_name, UD_CB_LINK_NAME) != 0 && HDstrcmp(link_name, NEW_UD_CB_LINK_NAME) != 0)
TEST_ERROR
- if (HDstrcmp((const char *)udata, UD_CB_TARGET))
+ if (HDstrcmp((const char *)udata, UD_CB_TARGET) != 0)
TEST_ERROR
if (udata_size != UD_CB_TARGET_LEN)
TEST_ERROR
@@ -14327,9 +14332,9 @@ UD_cb_move(const char *new_name, hid_t new_loc, const void *udata, size_t udata_
if (udata_size > 0 && !udata)
TEST_ERROR
- if (HDstrcmp(new_name, NEW_UD_CB_LINK_NAME))
+ if (HDstrcmp(new_name, NEW_UD_CB_LINK_NAME) != 0)
TEST_ERROR
- if (HDstrcmp((const char *)udata, UD_CB_TARGET))
+ if (HDstrcmp((const char *)udata, UD_CB_TARGET) != 0)
TEST_ERROR
if (udata_size != UD_CB_TARGET_LEN)
TEST_ERROR
@@ -14351,9 +14356,9 @@ UD_cb_delete(const char *link_name, hid_t file, const void *udata, size_t udata_
if (udata_size > 0 && !udata)
TEST_ERROR
- if (HDstrcmp(link_name, UD_CB_LINK_NAME) && HDstrcmp(link_name, NEW_UD_CB_LINK_NAME))
+ if (HDstrcmp(link_name, UD_CB_LINK_NAME) != 0 && HDstrcmp(link_name, NEW_UD_CB_LINK_NAME) != 0)
TEST_ERROR
- if (HDstrcmp((const char *)udata, UD_CB_TARGET))
+ if (HDstrcmp((const char *)udata, UD_CB_TARGET) != 0)
TEST_ERROR
if (udata_size != UD_CB_TARGET_LEN)
TEST_ERROR
@@ -14373,9 +14378,9 @@ UD_cb_query(const char *link_name, const void *udata, size_t udata_size, void *b
if (udata_size > 0 && !udata)
TEST_ERROR
- if (HDstrcmp(link_name, UD_CB_LINK_NAME))
+ if (HDstrcmp(link_name, UD_CB_LINK_NAME) != 0)
TEST_ERROR
- if (HDstrcmp((const char *)udata, UD_CB_TARGET))
+ if (HDstrcmp((const char *)udata, UD_CB_TARGET) != 0)
TEST_ERROR
if (udata_size != UD_CB_TARGET_LEN)
TEST_ERROR
@@ -14672,7 +14677,7 @@ lapl_udata(hid_t fapl, hbool_t new_format)
TEST_ERROR
/* Now use the same ud link to access group_b */
- strcpy(group_b_name, "group_b");
+ HDstrcpy(group_b_name, "group_b");
if (H5Pset(plist_id, DEST_PROP_NAME, group_b_name) < 0)
TEST_ERROR
@@ -14986,7 +14991,7 @@ ud_link_errors(hid_t fapl, hbool_t new_format)
H5E_END_TRY;
/* Create a user-defined link to the group. */
- strcpy(group_name, "/group");
+ HDstrcpy(group_name, "/group");
if (H5Lcreate_ud(fid, "/ud_link", (H5L_type_t)UD_CBFAIL_TYPE, &group_name, HDstrlen(group_name) + 1,
H5P_DEFAULT, H5P_DEFAULT) < 0)
FAIL_STACK_ERROR
@@ -15207,7 +15212,7 @@ lapl_nlinks(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/soft17"))
+ if (HDstrcmp(objname, "/soft17") != 0)
TEST_ERROR
/* Create group using soft link */
@@ -15251,7 +15256,7 @@ lapl_nlinks(hid_t fapl, hbool_t new_format)
/* Check name */
if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/soft4"))
+ if (HDstrcmp(objname, "/soft4") != 0)
TEST_ERROR
/* Test other functions that should use a LAPL */
@@ -15711,7 +15716,7 @@ visit_link_cb(hid_t H5_ATTR_UNUSED group_id, const char *name, const H5L_info2_t
lvisit_ud_t *op_data = (lvisit_ud_t *)_op_data;
/* Check for correct link information */
- if (HDstrcmp(op_data->info[op_data->idx].path, name))
+ if (HDstrcmp(op_data->info[op_data->idx].path, name) != 0)
return (H5_ITER_ERROR);
if (op_data->info[op_data->idx].type != linfo->type)
return (H5_ITER_ERROR);
@@ -15902,7 +15907,7 @@ visit_obj_cb(hid_t H5_ATTR_UNUSED group_id, const char *name, const H5O_info2_t
ovisit_ud_t *op_data = (ovisit_ud_t *)_op_data;
/* Check for correct object information */
- if (HDstrcmp(op_data->info[op_data->idx].path, name))
+ if (HDstrcmp(op_data->info[op_data->idx].path, name) != 0)
return (H5_ITER_ERROR);
if (op_data->info[op_data->idx].type != oinfo->type)
return (H5_ITER_ERROR);
@@ -15938,12 +15943,16 @@ obj_visit(hid_t fapl, hbool_t new_format)
if ((fid = build_visit_file(fapl)) < 0)
TEST_ERROR
+ //! [H5Ovisit3_snip]
+
/* Visit all the objects reachable from the root group (with file ID) */
udata.idx = 0;
udata.info = new_format ? ovisit0_new : ovisit0_old;
if (H5Ovisit3(fid, H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata, H5O_INFO_BASIC) < 0)
FAIL_STACK_ERROR
+ //! [H5Ovisit3_snip]
+
/* Visit all the objects reachable from the root group (with group ID) */
if ((gid = H5Gopen2(fid, "/", H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR
@@ -16015,6 +16024,8 @@ obj_visit_by_name(hid_t fapl, hbool_t new_format)
if ((fid = build_visit_file(fapl)) < 0)
TEST_ERROR
+ //! [H5Ovisit_by_name3_snip]
+
/* Visit all the objects reachable from the root group (with file ID) */
udata.idx = 0;
udata.info = new_format ? ovisit0_new : ovisit0_old;
@@ -16022,6 +16033,8 @@ obj_visit_by_name(hid_t fapl, hbool_t new_format)
H5P_DEFAULT) < 0)
FAIL_STACK_ERROR
+ //! [H5Ovisit_by_name3_snip]
+
/* Visit all the objects reachable from the root group (with group ID) */
if ((gid = H5Gopen2(fid, "/", H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR
@@ -16431,13 +16444,13 @@ link_filters(hid_t fapl, hbool_t new_format)
if (H5Pget_filter_by_id2(gcpl2, H5Z_FILTER_RESERVED + 42, &flags_out, &cd_nelmts, &cd_value_out,
(size_t)24, name_out, &filter_config_out) < 0)
TEST_ERROR
- if (flags_out != 0 || cd_value_out != cd_value || HDstrcmp(filter_class.name, name_out) ||
+ if (flags_out != 0 || cd_value_out != cd_value || HDstrcmp(filter_class.name, name_out) != 0 ||
filter_config_out != (H5Z_FILTER_CONFIG_ENCODE_ENABLED | H5Z_FILTER_CONFIG_DECODE_ENABLED))
TEST_ERROR
if (H5Pget_filter2(gcpl2, (unsigned)(nfilters - 1), &flags_out, &cd_nelmts, &cd_value_out, (size_t)24,
name_out, &filter_config_out) < 0)
TEST_ERROR
- if (flags_out != 0 || cd_value_out != cd_value || HDstrcmp(filter_class.name, name_out) ||
+ if (flags_out != 0 || cd_value_out != cd_value || HDstrcmp(filter_class.name, name_out) != 0 ||
filter_config_out != (H5Z_FILTER_CONFIG_ENCODE_ENABLED | H5Z_FILTER_CONFIG_DECODE_ENABLED))
TEST_ERROR
@@ -16448,7 +16461,7 @@ link_filters(hid_t fapl, hbool_t new_format)
if (H5Pget_filter_by_id2(gcpl2, H5Z_FILTER_RESERVED + 42, &flags_out, &cd_nelmts, &cd_value_out,
(size_t)24, name_out, &filter_config_out) < 0)
TEST_ERROR
- if (flags_out != 0 || cd_value_out != cd_value || HDstrcmp(filter_class.name, name_out) ||
+ if (flags_out != 0 || cd_value_out != cd_value || HDstrcmp(filter_class.name, name_out) != 0 ||
filter_config_out != (H5Z_FILTER_CONFIG_ENCODE_ENABLED | H5Z_FILTER_CONFIG_DECODE_ENABLED))
TEST_ERROR
@@ -17896,7 +17909,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, n, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(valname, tmpval))
+ if (HDstrcmp(valname, tmpval) != 0)
TEST_ERROR
} /* end if */
@@ -17905,7 +17918,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, n, tmpname, (size_t)NAME_BUF_SIZE,
H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(linkname, tmpname))
+ if (HDstrcmp(linkname, tmpname) != 0)
TEST_ERROR
/* Don't test "native" order if there is no creation order index, since
@@ -17935,7 +17948,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_NATIVE, n, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(valname, tmpval))
+ if (HDstrcmp(valname, tmpval) != 0)
TEST_ERROR
} /* end if */
@@ -17944,7 +17957,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_NATIVE, n, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(linkname, tmpname))
+ if (HDstrcmp(linkname, tmpname) != 0)
TEST_ERROR
} /* end if */
@@ -17969,7 +17982,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, (hsize_t)0, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(valname, tmpval))
+ if (HDstrcmp(valname, tmpval) != 0)
TEST_ERROR
} /* end if */
@@ -17978,7 +17991,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(linkname, tmpname))
+ if (HDstrcmp(linkname, tmpname) != 0)
TEST_ERROR
/* Verify the link information for first link, in increasing link name order */
@@ -18001,7 +18014,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, n, tmpval, (size_t)NAME_BUF_SIZE,
H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(valname, tmpval))
+ if (HDstrcmp(valname, tmpval) != 0)
TEST_ERROR
} /* end if */
@@ -18010,7 +18023,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, n, tmpname, (size_t)NAME_BUF_SIZE,
H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(linkname, tmpname))
+ if (HDstrcmp(linkname, tmpname) != 0)
TEST_ERROR
/* Don't test "native" order queries on link name order, since there's not
@@ -18037,7 +18050,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)0, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(valname, tmpval))
+ if (HDstrcmp(valname, tmpval) != 0)
TEST_ERROR
} /* end if */
@@ -18046,7 +18059,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(linkname, tmpname))
+ if (HDstrcmp(linkname, tmpname) != 0)
TEST_ERROR
/* Success */
@@ -18403,7 +18416,7 @@ link_info_by_idx_old(hid_t fapl)
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)u, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(valname, tmpval))
+ if (HDstrcmp(valname, tmpval) != 0)
TEST_ERROR
} /* end else */
@@ -18411,7 +18424,7 @@ link_info_by_idx_old(hid_t fapl)
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)u, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(objname, tmpname))
+ if (HDstrcmp(objname, tmpname) != 0)
TEST_ERROR
/* Verify link information (in native order - native is increasing) */
@@ -18428,7 +18441,7 @@ link_info_by_idx_old(hid_t fapl)
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_NATIVE, (hsize_t)u, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(valname, tmpval))
+ if (HDstrcmp(valname, tmpval) != 0)
TEST_ERROR
} /* end else */
@@ -18436,7 +18449,7 @@ link_info_by_idx_old(hid_t fapl)
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_NATIVE, (hsize_t)u, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(objname, tmpname))
+ if (HDstrcmp(objname, tmpname) != 0)
TEST_ERROR
/* Make link name for decreasing order queries */
@@ -18459,7 +18472,7 @@ link_info_by_idx_old(hid_t fapl)
if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)u, tmpval,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(valname, tmpval))
+ if (HDstrcmp(valname, tmpval) != 0)
TEST_ERROR
} /* end else */
@@ -18467,7 +18480,7 @@ link_info_by_idx_old(hid_t fapl)
if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)u, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(objname, tmpname))
+ if (HDstrcmp(objname, tmpname) != 0)
TEST_ERROR
} /* end for */
@@ -18691,7 +18704,7 @@ delete_by_idx(hid_t fapl)
HDsnprintf(objname, sizeof(objname), "filler %02u", (u + 1));
else
HDsnprintf(objname, sizeof(objname), "filler %02u", (max_compact - (u + 2)));
- if (HDstrcmp(objname, tmpname))
+ if (HDstrcmp(objname, tmpname) != 0)
TEST_ERROR
} /* end for */
@@ -18765,7 +18778,7 @@ delete_by_idx(hid_t fapl)
HDsnprintf(objname, sizeof(objname), "filler %02u", (u + 1));
else
HDsnprintf(objname, sizeof(objname), "filler %02u", ((max_compact * 2) - (u + 2)));
- if (HDstrcmp(objname, tmpname))
+ if (HDstrcmp(objname, tmpname) != 0)
TEST_ERROR
} /* end for */
@@ -18844,7 +18857,7 @@ delete_by_idx(hid_t fapl)
else
HDsnprintf(objname, sizeof(objname), "filler %02u",
((max_compact * 2) - ((u * 2) + 2)));
- if (HDstrcmp(objname, tmpname))
+ if (HDstrcmp(objname, tmpname) != 0)
TEST_ERROR
} /* end for */
@@ -18878,7 +18891,7 @@ delete_by_idx(hid_t fapl)
else
HDsnprintf(objname, sizeof(objname), "filler %02u",
((max_compact * 2) - ((u * 2) + 4)));
- if (HDstrcmp(objname, tmpname))
+ if (HDstrcmp(objname, tmpname) != 0)
TEST_ERROR
} /* end for */
@@ -19059,7 +19072,7 @@ delete_by_idx_old(hid_t fapl)
HDsnprintf(objname, sizeof(objname), "filler %02u", (u + 1));
else
HDsnprintf(objname, sizeof(objname), "filler %02u", dec_u);
- if (HDstrcmp(objname, tmpname))
+ if (HDstrcmp(objname, tmpname) != 0)
TEST_ERROR
} /* end for */
@@ -19138,7 +19151,7 @@ delete_by_idx_old(hid_t fapl)
HDsnprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 1));
else
HDsnprintf(objname, sizeof(objname), "filler %02u", dec_u);
- if (HDstrcmp(objname, tmpname))
+ if (HDstrcmp(objname, tmpname) != 0)
TEST_ERROR
} /* end for */
@@ -19176,7 +19189,7 @@ delete_by_idx_old(hid_t fapl)
HDsnprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 3));
else
HDsnprintf(objname, sizeof(objname), "filler %02u", dec_u);
- if (HDstrcmp(objname, tmpname))
+ if (HDstrcmp(objname, tmpname) != 0)
TEST_ERROR
} /* end for */
@@ -19262,7 +19275,7 @@ link_iterate_cb(hid_t group_id, const char *link_name, const H5L_info2_t *info,
/* Verify name of link */
HDsnprintf(objname, sizeof(objname), "filler %02u", (unsigned)my_info.corder);
- if (HDstrcmp(link_name, objname))
+ if (HDstrcmp(link_name, objname) != 0)
return H5_ITER_ERROR;
/* Check if we've visited this link before */
@@ -19777,7 +19790,7 @@ link_iterate_old_cb(hid_t group_id, const char *link_name, const H5L_info2_t *in
/* Verify name of link */
HDsnprintf(objname, sizeof(objname), "filler %02u",
(info ? (unsigned)op_data->curr : (unsigned)((op_data->ncalled - 1) + op_data->nskipped)));
- if (HDstrcmp(link_name, objname))
+ if (HDstrcmp(link_name, objname) != 0)
return H5_ITER_ERROR;
/* Check if we've visited this link before */