diff options
author | David Young <dyoung@hdfgroup.org> | 2019-12-18 21:25:11 (GMT) |
---|---|---|
committer | David Young <dyoung@hdfgroup.org> | 2019-12-18 21:25:11 (GMT) |
commit | 1a55342b3eb0721452032d9d935d20578b5d06b5 (patch) | |
tree | 6ed2e52445a20a72d88299cab8d200ec45a86b82 /test | |
parent | 2c0dddf263417043f65d1cf80b43772dac75b344 (diff) | |
download | hdf5-1a55342b3eb0721452032d9d935d20578b5d06b5.zip hdf5-1a55342b3eb0721452032d9d935d20578b5d06b5.tar.gz hdf5-1a55342b3eb0721452032d9d935d20578b5d06b5.tar.bz2 |
Allocate and zero using calloc(3) instead of malloc(3)+memset(3).
Diffstat (limited to 'test')
-rw-r--r-- | test/vfd_swmr.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/test/vfd_swmr.c b/test/vfd_swmr.c index 6b9e2dc..e4c6930 100644 --- a/test/vfd_swmr.c +++ b/test/vfd_swmr.c @@ -834,9 +834,8 @@ test_writer_md(void) TESTING("Verify the metadata file for VFD SWMR writer"); /* Allocate memory for the configuration structure */ - if((my_config = (H5F_vfd_swmr_config_t *)HDmalloc(sizeof(H5F_vfd_swmr_config_t))) == NULL) + if((my_config = HDcalloc(1, sizeof(H5F_vfd_swmr_config_t))) == NULL) FAIL_STACK_ERROR; - HDmemset(my_config, 0, sizeof(H5F_vfd_swmr_config_t)); /* Create a copy of the file access property list */ if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) |