diff options
Diffstat (limited to 'test/tattr.c')
-rw-r--r-- | test/tattr.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/test/tattr.c b/test/tattr.c index bc8fae1..69e625a 100644 --- a/test/tattr.c +++ b/test/tattr.c @@ -848,8 +848,8 @@ test_attr_compound_read(hid_t fapl) VERIFY(fields, 3, "H5Tget_nmembers"); for (i = 0; i < fields; i++) { fieldname = H5Tget_member_name(type, (unsigned)i); - if (!(HDstrcmp(fieldname, ATTR4_FIELDNAME1) || HDstrcmp(fieldname, ATTR4_FIELDNAME2) || - HDstrcmp(fieldname, ATTR4_FIELDNAME3))) + if (!(HDstrcmp(fieldname, ATTR4_FIELDNAME1) != 0 || HDstrcmp(fieldname, ATTR4_FIELDNAME2) != 0 || + HDstrcmp(fieldname, ATTR4_FIELDNAME3) != 0)) TestErrPrintf("invalid field name for field #%d: %s\n", i, fieldname); H5free_memory(fieldname); } /* end for */ @@ -896,7 +896,7 @@ test_attr_compound_read(hid_t fapl) /* Verify values read in */ for (i = 0; i < ATTR4_DIM1; i++) for (j = 0; j < ATTR4_DIM2; j++) - if (HDmemcmp(&attr_data4[i][j], &read_data4[i][j], sizeof(struct attr4_struct))) { + if (HDmemcmp(&attr_data4[i][j], &read_data4[i][j], sizeof(struct attr4_struct)) != 0) { HDprintf("%d: attribute data different: attr_data4[%d][%d].i=%d, read_data4[%d][%d].i=%d\n", __LINE__, i, j, attr_data4[i][j].i, i, j, read_data4[i][j].i); HDprintf("%d: attribute data different: attr_data4[%d][%d].d=%f, read_data4[%d][%d].d=%f\n", @@ -909,7 +909,7 @@ test_attr_compound_read(hid_t fapl) /* Verify Name */ name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name); VERIFY(name_len, HDstrlen(ATTR4_NAME), "H5Aget_name"); - if (HDstrcmp(attr_name, ATTR4_NAME)) + if (HDstrcmp(attr_name, ATTR4_NAME) != 0) TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR4_NAME); /* Close attribute datatype */ @@ -1268,7 +1268,7 @@ test_attr_mult_read(hid_t fapl) /* Verify Name */ name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name); VERIFY(name_len, HDstrlen(ATTR1_NAME), "H5Aget_name"); - if (HDstrcmp(attr_name, ATTR1_NAME)) + if (HDstrcmp(attr_name, ATTR1_NAME) != 0) TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR1_NAME); /* Verify Name with too small of a buffer */ @@ -1276,7 +1276,7 @@ test_attr_mult_read(hid_t fapl) VERIFY(name_len, HDstrlen(ATTR1_NAME), "H5Aget_name"); HDstrcpy(temp_name, ATTR1_NAME); /* make a copy of the name */ temp_name[HDstrlen(ATTR1_NAME) - 1] = '\0'; /* truncate it to match the one retrieved */ - if (HDstrcmp(attr_name, temp_name)) + if (HDstrcmp(attr_name, temp_name) != 0) TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, temp_name); /* Close attribute */ @@ -1326,7 +1326,7 @@ test_attr_mult_read(hid_t fapl) /* Verify Name */ name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name); VERIFY(name_len, HDstrlen(ATTR2_NAME), "H5Aget_name"); - if (HDstrcmp(attr_name, ATTR2_NAME)) + if (HDstrcmp(attr_name, ATTR2_NAME) != 0) TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR2_NAME); /* Verify Name with too small of a buffer */ @@ -1334,7 +1334,7 @@ test_attr_mult_read(hid_t fapl) VERIFY(name_len, HDstrlen(ATTR2_NAME), "H5Aget_name"); HDstrcpy(temp_name, ATTR2_NAME); /* make a copy of the name */ temp_name[HDstrlen(ATTR2_NAME) - 1] = '\0'; /* truncate it to match the one retrieved */ - if (HDstrcmp(attr_name, temp_name)) + if (HDstrcmp(attr_name, temp_name) != 0) TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, temp_name); /* Close attribute */ @@ -1388,7 +1388,7 @@ test_attr_mult_read(hid_t fapl) /* Verify Name */ name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name); VERIFY(name_len, HDstrlen(ATTR3_NAME), "H5Aget_name"); - if (HDstrcmp(attr_name, ATTR3_NAME)) + if (HDstrcmp(attr_name, ATTR3_NAME) != 0) TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR3_NAME); /* Verify Name with too small of a buffer */ @@ -1396,7 +1396,7 @@ test_attr_mult_read(hid_t fapl) VERIFY(name_len, HDstrlen(ATTR3_NAME), "H5Aget_name"); HDstrcpy(temp_name, ATTR3_NAME); /* make a copy of the name */ temp_name[HDstrlen(ATTR3_NAME) - 1] = '\0'; /* truncate it to match the one retrieved */ - if (HDstrcmp(attr_name, temp_name)) + if (HDstrcmp(attr_name, temp_name) != 0) TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, temp_name); /* Close attribute */ @@ -1425,19 +1425,19 @@ attr_op1(hid_t H5_ATTR_UNUSED loc_id, const char *name, const H5A_info_t H5_ATTR switch (*count) { case 0: - if (HDstrcmp(name, ATTR1_NAME)) + if (HDstrcmp(name, ATTR1_NAME) != 0) TestErrPrintf("attribute name different: name=%s, should be %s\n", name, ATTR1_NAME); (*count)++; break; case 1: - if (HDstrcmp(name, ATTR2_NAME)) + if (HDstrcmp(name, ATTR2_NAME) != 0) TestErrPrintf("attribute name different: name=%s, should be %s\n", name, ATTR2_NAME); (*count)++; break; case 2: - if (HDstrcmp(name, ATTR3_NAME)) + if (HDstrcmp(name, ATTR3_NAME) != 0) TestErrPrintf("attribute name different: name=%s, should be %s\n", name, ATTR3_NAME); (*count)++; break; @@ -1579,7 +1579,7 @@ test_attr_delete(hid_t fapl) /* Verify Name */ name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name); VERIFY(name_len, HDstrlen(ATTR1_NAME), "H5Aget_name"); - if (HDstrcmp(attr_name, ATTR1_NAME)) + if (HDstrcmp(attr_name, ATTR1_NAME) != 0) TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR1_NAME); /* Close attribute */ @@ -1594,7 +1594,7 @@ test_attr_delete(hid_t fapl) /* Verify Name */ name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name); VERIFY(name_len, HDstrlen(ATTR3_NAME), "H5Aget_name"); - if (HDstrcmp(attr_name, ATTR3_NAME)) + if (HDstrcmp(attr_name, ATTR3_NAME) != 0) TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR3_NAME); /* Close attribute */ @@ -1618,7 +1618,7 @@ test_attr_delete(hid_t fapl) /* Verify Name */ name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name); VERIFY(name_len, HDstrlen(ATTR3_NAME), "H5Aget_name"); - if (HDstrcmp(attr_name, ATTR3_NAME)) + if (HDstrcmp(attr_name, ATTR3_NAME) != 0) TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR3_NAME); /* Close attribute */ @@ -2112,7 +2112,7 @@ test_attr_dense_verify(hid_t loc_id, unsigned max_attr) HDsprintf(attrname, "attr %02u", u); name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, check_name); VERIFY(name_len, HDstrlen(attrname), "H5Aget_name"); - if (HDstrcmp(check_name, attrname)) + if (HDstrcmp(check_name, attrname) != 0) TestErrPrintf("attribute name different: attrname = '%s', should be '%s'\n", check_name, attrname); @@ -5647,7 +5647,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t us ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, n, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT); CHECK(ret, FAIL, "H5Aget_name_by_idx"); - if (HDstrcmp(attrname, tmpname)) + if (HDstrcmp(attrname, tmpname) != 0) TestErrPrintf("Line %d: attribute name size wrong!\n", __LINE__); /* Don't test "native" order if there is no creation order index, since @@ -5673,7 +5673,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t us ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_NATIVE, n, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT); CHECK(ret, FAIL, "H5Aget_name_by_idx"); - if (HDstrcmp(attrname, tmpname)) + if (HDstrcmp(attrname, tmpname) != 0) TestErrPrintf("Line %d: attribute name size wrong!\n", __LINE__); } /* end if */ @@ -5694,7 +5694,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t us ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, (hsize_t)0, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT); CHECK(ret, FAIL, "H5Aget_name_by_idx"); - if (HDstrcmp(attrname, tmpname)) + if (HDstrcmp(attrname, tmpname) != 0) TestErrPrintf("Line %d: attribute name size wrong!\n", __LINE__); /* Verify the information for first attribute, in increasing name order */ @@ -5714,7 +5714,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t us ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_NAME, H5_ITER_INC, n, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT); CHECK(ret, FAIL, "H5Aget_name_by_idx"); - if (HDstrcmp(attrname, tmpname)) + if (HDstrcmp(attrname, tmpname) != 0) TestErrPrintf("Line %d: attribute name size wrong!\n", __LINE__); /* Don't test "native" order queries on link name order, since there's not @@ -5738,7 +5738,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t us ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)0, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT); CHECK(ret, FAIL, "H5Aget_name_by_idx"); - if (HDstrcmp(attrname, tmpname)) + if (HDstrcmp(attrname, tmpname) != 0) TestErrPrintf("Line %d: attribute name size wrong!\n", __LINE__); /* Retrieve current # of errors */ @@ -6569,7 +6569,7 @@ attr_iterate2_cb(hid_t loc_id, const char *attr_name, const H5A_info_t *info, vo /* Verify name of link */ HDsprintf(attrname, "attr %02u", (unsigned)my_info.corder); - if (HDstrcmp(attr_name, attrname)) + if (HDstrcmp(attr_name, attrname) != 0) return (H5_ITER_ERROR); /* Check if we've visited this link before */ |