summaryrefslogtreecommitdiffstats
path: root/test/use_common.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2021-05-07 02:48:58 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2021-05-07 02:48:58 (GMT)
commit7a5b440fa89538b94088cc89a1188aef27033e74 (patch)
tree2ee57d411d75cf7b74595722a5653e0842e6db68 /test/use_common.c
parentf2cb86499efa2fe6f44ca2f4e93ea62e952d0fb0 (diff)
downloadhdf5-7a5b440fa89538b94088cc89a1188aef27033e74.zip
hdf5-7a5b440fa89538b94088cc89a1188aef27033e74.tar.gz
hdf5-7a5b440fa89538b94088cc89a1188aef27033e74.tar.bz2
Brings H5Z and many test changes from develop
Diffstat (limited to 'test/use_common.c')
-rw-r--r--test/use_common.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/use_common.c b/test/use_common.c
index b407434..0ea2c83 100644
--- a/test/use_common.c
+++ b/test/use_common.c
@@ -13,11 +13,9 @@
#include "h5test.h"
/* This test uses many POSIX things that are not available on
- * Windows. We're using a check for fork(2) here as a proxy for
- * all POSIX/Unix/Linux things until this test can be made
- * more platform-independent.
+ * Windows.
*/
-#ifdef H5_HAVE_FORK
+#ifdef H5_HAVE_UNISTD_H
#include "use.h"
@@ -68,7 +66,7 @@ parse_option(int argc, char *const argv[], options_t *opts)
switch (c) {
case 'h':
usage(opts->progname);
- exit(EXIT_SUCCESS);
+ HDexit(EXIT_SUCCESS);
break;
case 'f': /* usecase data file name */
opts->filename = HDstrdup(optarg);
@@ -442,7 +440,7 @@ read_uc_file(hbool_t towait, options_t *opts)
{
hid_t fid; /* File ID for new HDF5 file */
hid_t dsid; /* dataset ID */
- UC_CTYPE *buffer, *bufptr; /* read data buffer */
+ UC_CTYPE *buffer = NULL, *bufptr = NULL; /* read data buffer */
hid_t f_sid; /* dataset file space id */
hid_t m_sid; /* memory space id */
int rank; /* rank */
@@ -605,10 +603,12 @@ read_uc_file(hbool_t towait, options_t *opts)
return -1;
}
+ HDfree(buffer);
+
if (nreadererr)
return -1;
else
return 0;
} /* end read_uc_file() */
-#endif /* H5_HAVE_FORK */
+#endif /* H5_HAVE_UNISTD_H */