diff options
author | David Young <dyoung@hdfgroup.org> | 2020-08-21 14:50:49 (GMT) |
---|---|---|
committer | David Young <dyoung@hdfgroup.org> | 2020-08-21 14:50:49 (GMT) |
commit | 88342f8b3f8658bf82ce5d25d5597f237f23c544 (patch) | |
tree | 3a055b382bb110e77868815b79e51f69339c7519 /test/vfd_swmr_remove_reader.c | |
parent | 2fe7d17a766faab80edb4f0e094f2dc3f8210d01 (diff) | |
download | hdf5-88342f8b3f8658bf82ce5d25d5597f237f23c544.zip hdf5-88342f8b3f8658bf82ce5d25d5597f237f23c544.tar.gz hdf5-88342f8b3f8658bf82ce5d25d5597f237f23c544.tar.bz2 |
Use the safe calloc() idiom, p = calloc(1, sizeof(*p)), and do
not gratuitously cast to p's type.
Diffstat (limited to 'test/vfd_swmr_remove_reader.c')
-rw-r--r-- | test/vfd_swmr_remove_reader.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/vfd_swmr_remove_reader.c b/test/vfd_swmr_remove_reader.c index c7689c0..f56fce3 100644 --- a/test/vfd_swmr_remove_reader.c +++ b/test/vfd_swmr_remove_reader.c @@ -309,7 +309,7 @@ read_records(const char *filename, unsigned verbose, unsigned long nseconds, goto error; /* Allocate memory for the configuration structure */ - if((config = (H5F_vfd_swmr_config_t *)HDcalloc(1, sizeof(H5F_vfd_swmr_config_t))) == NULL) + if((config = HDcalloc(1, sizeof(*config))) == NULL) goto error; config->version = H5F__CURR_VFD_SWMR_CONFIG_VERSION; |