diff options
Diffstat (limited to 'test/file_image.c')
-rw-r--r-- | test/file_image.c | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/test/file_image.c b/test/file_image.c index a43f176..28f56d4 100644 --- a/test/file_image.c +++ b/test/file_image.c @@ -102,7 +102,7 @@ test_properties(void) * not be the case. */ size = (size_t)count * sizeof(char); - if (NULL == (buffer = (char *)HDmalloc(size))) + if (NULL == (buffer = (char *)malloc(size))) TEST_ERROR; for (i = 0; i < count - 1; i++) buffer[i] = (char)(65 + i); @@ -158,7 +158,7 @@ error: retval = 1; if (H5Pclose(fapl_2) < 0) retval = 1; - HDfree(buffer); + free(buffer); H5free_memory(temp); H5free_memory(temp2); @@ -187,7 +187,7 @@ malloc_cb(size_t size, H5FD_file_image_op_t op, void *udata) u->used_callbacks |= MALLOC; u->malloc_src = op; - return HDmalloc(size); + return malloc(size); } /****************************************************************************** @@ -231,7 +231,7 @@ realloc_cb(void *ptr, size_t size, H5FD_file_image_op_t op, void *udata) u->used_callbacks |= REALLOC; u->realloc_src = op; - return HDrealloc(ptr, size); + return realloc(ptr, size); } /****************************************************************************** @@ -251,7 +251,7 @@ free_cb(void *ptr, H5FD_file_image_op_t op, void *udata) u->used_callbacks |= FREE; u->free_src = op; - HDfree(ptr); + free(ptr); return (SUCCEED); } @@ -349,7 +349,7 @@ test_callbacks(void) TESTING("Callback use in property list operations"); /* Allocate and initialize udata */ - udata = (udata_t *)HDmalloc(sizeof(udata_t)); + udata = (udata_t *)malloc(sizeof(udata_t)); VERIFY(udata != NULL, "udata malloc failed"); reset_udata(udata); @@ -358,7 +358,7 @@ test_callbacks(void) /* Allocate and initialize file image buffer */ size = (size_t)count * sizeof(char); - file_image = (char *)HDmalloc(size); + file_image = (char *)malloc(size); VERIFY(file_image != NULL, "file_image malloc failed"); for (i = 0; i < count - 1; i++) file_image[i] = (char)(65 + i); @@ -523,16 +523,16 @@ test_callbacks(void) /* Close stuff */ if (H5Pclose(fapl_1) < 0) FAIL_STACK_ERROR; - HDfree(file_image); - HDfree(temp_file_image); - HDfree(udata); + free(file_image); + free(temp_file_image); + free(udata); PASSED(); return 0; error: - HDfree(file_image); - HDfree(udata); + free(file_image); + free(udata); return 1; } /* test_callbacks() */ @@ -592,7 +592,7 @@ test_core(void) VERIFY(ret >= 0, "h5_make_local_copy"); /* Allocate and initialize udata */ - udata = (udata_t *)HDmalloc(sizeof(udata_t)); + udata = (udata_t *)malloc(sizeof(udata_t)); VERIFY(udata != NULL, "udata malloc failed"); /* copy the address of the udata into the callbacks structure */ @@ -661,7 +661,7 @@ test_core(void) ret = HDfstat(fd, &sb); VERIFY(ret == 0, "fstat failed"); size = (size_t)sb.st_size; - file_image = (unsigned char *)HDmalloc(size); + file_image = (unsigned char *)malloc(size); if (HDread(fd, file_image, size) < 0) FAIL_PUTS_ERROR("unable to read from file descriptor"); ret = HDclose(fd); @@ -679,8 +679,8 @@ test_core(void) /* Release resources */ h5_clean_files(FILENAME, fapl); - HDfree(udata); - HDfree(file_image); + free(udata); + free(file_image); HDremove(copied_filename); PASSED(); @@ -785,8 +785,8 @@ test_get_file_image(const char *test_banner, const int file_name_num, hid_t fapl VERIFY(image_size > 0, "H5Fget_file_image(1) failed."); /* allocate a buffer of the appropriate size */ - image_ptr = HDmalloc((size_t)image_size); - VERIFY(image_ptr != NULL, "HDmalloc(1) failed."); + image_ptr = malloc((size_t)image_size); + VERIFY(image_ptr != NULL, "malloc(1) failed."); /* load the image of the file into the buffer */ bytes_read = H5Fget_file_image(file_id, image_ptr, (size_t)image_size); @@ -835,8 +835,8 @@ test_get_file_image(const char *test_banner, const int file_name_num, hid_t fapl VERIFY(file_size >= image_size, "file size != image size."); /* allocate a buffer for the test file image */ - file_image_ptr = HDmalloc((size_t)file_size); - VERIFY(file_image_ptr != NULL, "HDmalloc(2f) failed."); + file_image_ptr = malloc((size_t)file_size); + VERIFY(file_image_ptr != NULL, "malloc(2f) failed."); size_remaining = image_size; insertion_ptr = file_image_ptr; @@ -893,8 +893,8 @@ test_get_file_image(const char *test_banner, const int file_name_num, hid_t fapl VERIFY(file_size == image_size, "file size != image size."); /* allocate a buffer for the test file image */ - file_image_ptr = HDmalloc((size_t)file_size); - VERIFY(file_image_ptr != NULL, "HDmalloc(2) failed."); + file_image_ptr = malloc((size_t)file_size); + VERIFY(file_image_ptr != NULL, "malloc(2) failed."); /* open the test file using standard I/O calls */ fd = HDopen(file_name, O_RDONLY); @@ -958,11 +958,11 @@ test_get_file_image(const char *test_banner, const int file_name_num, hid_t fapl /* discard the image buffer if it exists */ if (image_ptr != NULL) - HDfree(image_ptr); + free(image_ptr); /* discard the image buffer if it exists */ if (file_image_ptr != NULL) - HDfree(file_image_ptr); + free(file_image_ptr); PASSED(); @@ -1061,8 +1061,8 @@ test_get_file_image_error_rejection(void) VERIFY(image_size > 0, "H5Fget_file_image(1 -- test 1) failed."); /* allocate a buffer of the appropriate size */ - image_ptr = HDmalloc((size_t)image_size); - VERIFY(image_ptr != NULL, "HDmalloc(1) failed."); + image_ptr = malloc((size_t)image_size); + VERIFY(image_ptr != NULL, "malloc(1) failed."); /* load the image of the file into the buffer */ H5E_BEGIN_TRY @@ -1107,7 +1107,7 @@ test_get_file_image_error_rejection(void) /* discard the image buffer if it exists */ if (image_ptr != NULL) - HDfree(image_ptr); + free(image_ptr); /************************** Test #2 **********************************/ /* set up a multi file driver test file, and try to get its image |