summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2022-03-09 20:07:54 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2022-03-09 23:00:07 (GMT)
commitda1b827c920ccf073a0c78c74a83d74a8473bd0d (patch)
tree5a88c7215288fc23aa503a396a2cc09459f2c30d /test
parent467150ad9bea44ca50a5fcd21f4581982d74fc92 (diff)
downloadhdf5-da1b827c920ccf073a0c78c74a83d74a8473bd0d.zip
hdf5-da1b827c920ccf073a0c78c74a83d74a8473bd0d.tar.gz
hdf5-da1b827c920ccf073a0c78c74a83d74a8473bd0d.tar.bz2
Minor tweaks from VFD SWMR normalization (#1474)
Diffstat (limited to 'test')
-rw-r--r--test/swmr_common.c5
-rw-r--r--test/swmr_sparse_reader.c2
2 files changed, 3 insertions, 4 deletions
diff --git a/test/swmr_common.c b/test/swmr_common.c
index 1a602b2..0348608 100644
--- a/test/swmr_common.c
+++ b/test/swmr_common.c
@@ -202,13 +202,12 @@ generate_symbols(void)
unsigned u, v; /* Local index variables */
for (u = 0; u < NLEVELS; u++) {
- symbol_info[u] = (symbol_info_t *)malloc(symbol_count[u] * sizeof(symbol_info_t));
+ symbol_info[u] = HDmalloc(symbol_count[u] * sizeof(symbol_info_t));
for (v = 0; v < symbol_count[u]; v++) {
char name_buf[64];
generate_name(name_buf, u, v);
- symbol_info[u][v].name = (char *)malloc(strlen(name_buf) + 1);
- strcpy(symbol_info[u][v].name, name_buf);
+ symbol_info[u][v].name = HDstrdup(name_buf);
symbol_info[u][v].dsid = -1;
symbol_info[u][v].nrecords = 0;
} /* end for */
diff --git a/test/swmr_sparse_reader.c b/test/swmr_sparse_reader.c
index ccf5e4a..3206ee2 100644
--- a/test/swmr_sparse_reader.c
+++ b/test/swmr_sparse_reader.c
@@ -117,7 +117,7 @@ check_dataset(hid_t fid, unsigned verbose, const symbol_info_t *symbol, symbol_t
(uintmax_t)start[0], (uintmax_t)start[1]);
/* Read record from dataset */
- record->rec_id = (uint64_t)ULLONG_MAX;
+ record->rec_id = UINT64_MAX;
if (H5Dread(dsid, symbol_tid, rec_sid, file_sid, H5P_DEFAULT, record) < 0)
return -1;