summaryrefslogtreecommitdiffstats
path: root/test/titerate.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/titerate.c')
-rw-r--r--test/titerate.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/test/titerate.c b/test/titerate.c
index 9fd70f3..b7aa25c 100644
--- a/test/titerate.c
+++ b/test/titerate.c
@@ -24,7 +24,7 @@
#include "hdf5.h"
-#define FILE "titerate.h5"
+#define FILE_NAME "titerate.h5"
/* Number of datasets for group iteration test */
#define NDATASETS 50
@@ -118,7 +118,7 @@ static void test_iter_group(void)
MESSAGE(5, ("Testing Group Iteration Functionality\n"));
/* Create the test file with the datasets */
- file = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ file = H5Fcreate(FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
CHECK(file, FAIL, "H5Fcreate");
datatype = H5Tcopy(H5T_NATIVE_INT);
@@ -133,7 +133,7 @@ static void test_iter_group(void)
CHECK(dataset, FAIL, "H5Dcreate");
/* Keep a copy of the dataset names around for later */
- dnames[i]=strdup(name);
+ dnames[i]=HDstrdup(name);
CHECK(dnames[i], NULL, "strdup");
ret=H5Dclose(dataset);
@@ -154,7 +154,7 @@ static void test_iter_group(void)
qsort(dnames,NDATASETS,sizeof(char *),iter_strcmp);
/* Iterate through the datasets in the root group in various ways */
- file=H5Fopen(FILE, H5F_ACC_RDONLY, H5P_DEFAULT);
+ file=H5Fopen(FILE_NAME, H5F_ACC_RDONLY, H5P_DEFAULT);
CHECK(file, FAIL, "H5Fopen");
/* Test all objects in group, when callback always returns 0 */
@@ -262,7 +262,7 @@ static void test_iter_attr(void)
MESSAGE(5, ("Testing Attribute Iteration Functionality\n"));
/* Create the test file with the datasets */
- file = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ file = H5Fcreate(FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
CHECK(file, FAIL, "H5Fcreate");
datatype = H5Tcopy(H5T_NATIVE_INT);
@@ -280,7 +280,7 @@ static void test_iter_attr(void)
CHECK(attribute, FAIL, "H5Acreate");
/* Keep a copy of the attribute names around for later */
- anames[i]=strdup(name);
+ anames[i]=HDstrdup(name);
CHECK(anames[i], NULL, "strdup");
ret=H5Aclose(attribute);
@@ -301,7 +301,7 @@ static void test_iter_attr(void)
CHECK(ret, FAIL, "H5Fclose");
/* Iterate through the attributes on the dataset in various ways */
- file=H5Fopen(FILE, H5F_ACC_RDONLY, H5P_DEFAULT);
+ file=H5Fopen(FILE_NAME, H5F_ACC_RDONLY, H5P_DEFAULT);
CHECK(file, FAIL, "H5Fopen");
dataset=H5Dopen(file, "Dataset");
@@ -438,7 +438,7 @@ static void test_iter_group_large(void)
MESSAGE(5, ("Testing Large Group Iteration Functionality\n"));
/* Create file */
- file = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ file = H5Fcreate(FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
CHECK(file, FAIL, "H5Fcreate");
/* Create dataspace for datasets */
@@ -555,6 +555,6 @@ test_iterate(void)
void
cleanup_iterate(void)
{
- remove(FILE);
+ remove(FILE_NAME);
}