diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2021-03-09 18:57:48 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2021-03-09 18:57:48 (GMT) |
commit | 79b0aa571db9af191858391dbb28956c6fcbef4e (patch) | |
tree | 5dbf4d900c218cafa99e324c809ee3814ea24c02 | |
parent | b8c5c9f20d48476e5c24cedbd2d8953f5883c02c (diff) | |
download | hdf5-79b0aa571db9af191858391dbb28956c6fcbef4e.zip hdf5-79b0aa571db9af191858391dbb28956c6fcbef4e.tar.gz hdf5-79b0aa571db9af191858391dbb28956c6fcbef4e.tar.bz2 |
Replaces BSD random functions with ISO
-rw-r--r-- | test/vfd_swmr.c | 5 | ||||
-rw-r--r-- | test/vfd_swmr_zoo_writer.c | 6 |
2 files changed, 4 insertions, 7 deletions
diff --git a/test/vfd_swmr.c b/test/vfd_swmr.c index e2b0172..aa1992c 100644 --- a/test/vfd_swmr.c +++ b/test/vfd_swmr.c @@ -3077,7 +3077,6 @@ test_shadow_index_lookup(void) unsigned i, j, failj = UINT_MAX; hbool_t have_failj = FALSE; unsigned long tmpl; - char *ostate; const char *seedvar = "H5_SHADOW_INDEX_SEED"; const char *failvar = "H5_SHADOW_INDEX_FAIL"; @@ -3109,7 +3108,7 @@ test_shadow_index_lookup(void) break; } - ostate = initstate(seed, vector, _arraycount(vector)); + HDsrandom(seed); size[5] = (uint32_t)(1024 + HDrandom() % (16 * 1024 * 1024 - 1024)); @@ -3148,7 +3147,7 @@ test_shadow_index_lookup(void) if (idx != NULL) HDfree(idx); } - (void)setstate(ostate); + out: if (nerrors == 0) PASSED(); diff --git a/test/vfd_swmr_zoo_writer.c b/test/vfd_swmr_zoo_writer.c index 9ede006..07d3ae4 100644 --- a/test/vfd_swmr_zoo_writer.c +++ b/test/vfd_swmr_zoo_writer.c @@ -217,10 +217,9 @@ main(int argc, char **argv) struct timespec lastmsgtime = {.tv_sec = 0, .tv_nsec = 0}; bool wait_for_signal; int ch; - char vector[8]; unsigned seed; unsigned long tmpl; - char *end, *ostate; + char *end; const char *seedvar = "H5_ZOO_STEP_SEED"; bool use_vfd_swmr = true; bool print_estack = false; @@ -349,7 +348,7 @@ main(int argc, char **argv) dbgf(1, "To reproduce, set seed (%s) to %u.\n", seedvar, seed); - ostate = initstate(seed, vector, _arraycount(vector)); + HDsrandom(seed); if (!create_zoo(fid, ".", &lastmsgtime, config)) errx(EXIT_FAILURE, "create_zoo didn't pass self-check"); @@ -368,7 +367,6 @@ main(int argc, char **argv) if (!delete_zoo(fid, ".", &lastmsgtime, config)) errx(EXIT_FAILURE, "delete_zoo failed"); - (void)setstate(ostate); } else { dbgf(2, "Reading zoo...\n"); |