diff options
Diffstat (limited to 'test/objcopy.c')
-rw-r--r-- | test/objcopy.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/test/objcopy.c b/test/objcopy.c index 489d6dd..05ddfa4 100644 --- a/test/objcopy.c +++ b/test/objcopy.c @@ -592,7 +592,7 @@ test_copy_attach_attributes(hid_t loc_id, hid_t type_id) goto done; for(u = 0; u < num_attributes_g; u++) { - sprintf(attr_name, "%u attr", u); + HDsprintf(attr_name, "%u attr", u); /* Set attribute data */ attr_data[0] = (int)(100 * u); @@ -661,7 +661,7 @@ test_copy_attach_paired_attributes(hid_t loc_id, hid_t loc_id2, hid_t type_id) if((acpl = H5Pcreate(H5P_ATTRIBUTE_CREATE)) < 0) goto done; for(u = 0; u < num_attributes_g; u++) { - sprintf(attr_name, "%u attr", u); + HDsprintf(attr_name, "%u attr", u); /* Set attribute data */ attr_data[0] = (int)(100 * u); @@ -6667,15 +6667,15 @@ test_copy_group_deep(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_f /* create nested sub-groups & datasets */ for(i = 0; i < NUM_SUB_GROUPS; i++) { - sprintf(objname, "Group #%d", i); + HDsprintf(objname, "Group #%d", i); if((gid_sub = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR for(j = 0; j < NUM_SUB_GROUPS; j++) { - sprintf(objname, "Group #%d", j); + HDsprintf(objname, "Group #%d", j); if((gid_sub2 = H5Gcreate2(gid_sub, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR for(k = 0; k < NUM_DATASETS; k++) { - sprintf(objname, "Dataset #%d", k); + HDsprintf(objname, "Dataset #%d", k); /* add a dataset to the group */ if((did = H5Dcreate2(gid_sub2, objname, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR @@ -6908,11 +6908,11 @@ test_copy_group_wide_loop(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t /* create wide sub-group hierarchy, with multiple links to higher groups */ for(u = 0; u < NUM_WIDE_LOOP_GROUPS; u++) { - sprintf(objname, "%s-%u", NAME_GROUP_SUB, u); + HDsprintf(objname, "%s-%u", NAME_GROUP_SUB, u); if((gid_sub = H5Gcreate2(gid, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR for(v = 0; v < NUM_WIDE_LOOP_GROUPS; v++) { - sprintf(objname, "%s-%u", NAME_GROUP_SUB_SUB2, v); + HDsprintf(objname, "%s-%u", NAME_GROUP_SUB_SUB2, v); if((gid_sub2 = H5Gcreate2(gid_sub, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR /* Create link to top group */ @@ -14090,7 +14090,7 @@ error: /*------------------------------------------------------------------------- - * Function: main + * Function: main * * Purpose: Test H5Ocopy() * @@ -14098,7 +14098,7 @@ error: * new or old format, messages can be shared in either, * both, or neither of the source and destination files. * - * Return: Non-negative on success/Negative on failure + * Return: EXIT_SUCCESS/EXIT_FAILURE * * Programmer: Peter Cao * Friday, September 30, 2005 @@ -14376,7 +14376,7 @@ main(void) if(nerrors) { HDprintf("***** %d OBJECT COPY TEST%s FAILED! *****\n", nerrors, (1 == nerrors ? "" : "S")); - exit(EXIT_FAILURE); + HDexit(EXIT_FAILURE); } /* end if */ HDputs ("All object copying tests passed."); @@ -14406,9 +14406,9 @@ main(void) h5_cleanup(FILENAME, fapl); - return 0; + HDexit(EXIT_SUCCESS); error: - return 1; + HDexit(EXIT_FAILURE); } /* main */ |