diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2018-11-27 12:31:57 -0800 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2018-11-27 12:31:57 -0800 |
commit | 0681a6f7d42bdc4c22b096598337b8a17f3bf60b (patch) | |
tree | 5a05553400950b1ef543920227e40c47d1f4e2ff | |
parent | 38b70d0dc5c39e6278bf30c67e1e12f7ac8c1fa0 (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--------- | libpad | 0 | ||||
-rw-r--r-- | src/ix2.c | 6 |
2 files changed, 3 insertions, 3 deletions
diff --git a/libpad b/libpad -Subproject 3abb513923adb1f5238a62dd7c64c433a08d9d6 +Subproject 16b9b42cecc81f7540aef85459cf1fa191fa641 @@ -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; |