From 0681a6f7d42bdc4c22b096598337b8a17f3bf60b Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Tue, 27 Nov 2018 12:31:57 -0800 Subject: libpad: sync with upstream, use PAD_FLAGS_ZERO The code used calloc() previously, and there remain assumptions about the allocated memory being zeroed, hence adding the flag to libpad and using it here. --- libpad | 2 +- src/ix2.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libpad b/libpad index 3abb513..16b9b42 160000 --- a/libpad +++ b/libpad @@ -1 +1 @@ -Subproject commit 3abb513923adb1f5238a62dd7c64c433a08d9d62 +Subproject commit 16b9b42cecc81f7540aef85459cf1fa191fa641c diff --git a/src/ix2.c b/src/ix2.c index 9a8fd02..2876d32 100644 --- a/src/ix2.c +++ b/src/ix2.c @@ -427,15 +427,15 @@ ix2_t * ix2_new(bb2f_t *aabb, unsigned max_per_node, unsigned max_depth) ix2->max_per_node = max_per_node; ix2->max_depth = max_depth; - ix2->node_pad = pad_new(sizeof(ix2_node_t) * 8); + ix2->node_pad = pad_new(sizeof(ix2_node_t) * 8, PAD_FLAGS_ZERO); if (!ix2->node_pad) goto fail_node_pad; - ix2->ref_pad = pad_new(sizeof(ix2_object_ref_t) * 64); + ix2->ref_pad = pad_new(sizeof(ix2_object_ref_t) * 64, PAD_FLAGS_ZERO); if (!ix2->ref_pad) goto fail_ref_pad; - ix2->object_pad = pad_new(sizeof(ix2_object_t) * 32); + ix2->object_pad = pad_new(sizeof(ix2_object_t) * 32, PAD_FLAGS_ZERO); if (!ix2->object_pad) goto fail_object_pad; -- cgit v1.2.3