summaryrefslogtreecommitdiffstats
path: root/test/swmr_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/swmr_common.c')
-rw-r--r--test/swmr_common.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/swmr_common.c b/test/swmr_common.c
index 2201427..b359bc6 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 *)HDmalloc(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 *)HDmalloc(HDstrlen(name_buf) + 1);
- HDstrcpy(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 */