diff options
Diffstat (limited to 'test/thread/rw.c')
-rw-r--r-- | test/thread/rw.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/test/thread/rw.c b/test/thread/rw.c index 913fa6e6c25..10f13b9eb04 100644 --- a/test/thread/rw.c +++ b/test/thread/rw.c @@ -59,16 +59,13 @@ rw_start(u_int readers, u_int writers) total_nops = 0; /* Create per-thread structures. */ - if ((run_info = calloc( - (size_t)(readers + writers), sizeof(*run_info))) == NULL || - (tids = calloc((size_t)(readers + writers), sizeof(*tids))) == NULL) - testutil_die(errno, "calloc"); + run_info = dcalloc((size_t)(readers + writers), sizeof(*run_info)); + tids = dcalloc((size_t)(readers + writers), sizeof(*tids)); /* Create the files and load the initial records. */ for (i = 0; i < writers; ++i) { if (i == 0 || multiple_files) { - if ((run_info[i].name = malloc(64)) == NULL) - testutil_die(errno, "malloc"); + run_info[i].name = dmalloc(64); snprintf(run_info[i].name, 64, FNAME, i); /* Vary by orders of magnitude */ @@ -88,8 +85,7 @@ rw_start(u_int readers, u_int writers) for (i = 0; i < readers; ++i) { offset = i + writers; if (multiple_files) { - if ((run_info[offset].name = malloc(64)) == NULL) - testutil_die(errno, "malloc"); + run_info[offset].name = dmalloc(64); /* Have readers read from tables with writes. */ name_index = i % writers; snprintf( |