summaryrefslogtreecommitdiff
path: root/test/bloom/test_bloom.c
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@mongodb.com>2016-05-05 15:38:12 +1000
committerMichael Cahill <michael.cahill@mongodb.com>2016-05-05 15:38:12 +1000
commit636a7b25ef3eca6b98009330f4d35337d4f35717 (patch)
tree7cc2e03ad96e206cbe73343feef10197023a37da /test/bloom/test_bloom.c
parenteaa7b5f0fcc62f356c33a2c56f45b609a73ca5dd (diff)
parent75c22bc0c662622c14e5c47d99ff262cede2c6bf (diff)
downloadmongodb-3.3.6.tar.gz
Merge branch 'develop' into mongodb-3.4mongodb-3.3.6
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);
}