summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2018-11-27 12:31:57 -0800
committerVito Caputo <vcaputo@pengaru.com>2018-11-27 12:31:57 -0800
commit0681a6f7d42bdc4c22b096598337b8a17f3bf60b (patch)
tree5a05553400950b1ef543920227e40c47d1f4e2ff
parent38b70d0dc5c39e6278bf30c67e1e12f7ac8c1fa0 (diff)
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.
m---------libpad0
-rw-r--r--src/ix2.c6
2 files changed, 3 insertions, 3 deletions
diff --git a/libpad b/libpad
-Subproject 3abb513923adb1f5238a62dd7c64c433a08d9d6
+Subproject 16b9b42cecc81f7540aef85459cf1fa191fa641
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;
© 2021 All Rights Reserved