summaryrefslogtreecommitdiff
path: root/test/bloom/test_bloom.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/bloom/test_bloom.c')
-rw-r--r--test/bloom/test_bloom.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/test/bloom/test_bloom.c b/test/bloom/test_bloom.c
index f95bc7faaf9..6955813dc68 100644
--- a/test/bloom/test_bloom.c
+++ b/test/bloom/test_bloom.c
@@ -189,9 +189,7 @@ run(void)
* ensure the value doesn't overlap with existing values.
*/
item.size = g.c_key_max + 10;
- item.data = calloc(item.size, 1);
- if (item.data == NULL)
- testutil_die(ENOMEM, "value buffer malloc");
+ item.data = dcalloc(item.size, 1);
memset((void *)item.data, 'a', item.size);
for (i = 0, fp = 0; i < g.c_ops; i++) {
((uint8_t *)item.data)[i % item.size] =
@@ -232,14 +230,10 @@ populate_entries(void)
srand(g.c_srand);
- entries = calloc(g.c_ops, sizeof(uint8_t *));
- if (entries == NULL)
- testutil_die(ENOMEM, "key buffer malloc");
+ entries = dcalloc(g.c_ops, sizeof(uint8_t *));
for (i = 0; i < g.c_ops; i++) {
- entries[i] = calloc(g.c_key_max, sizeof(uint8_t));
- if (entries[i] == NULL)
- testutil_die(ENOMEM, "key buffer malloc 2");
+ entries[i] = dcalloc(g.c_key_max, sizeof(uint8_t));
for (j = 0; j < g.c_key_max; j++)
entries[i][j] = 'a' + ((uint8_t)rand() % 26);
}