prick_btree: Add assertion to ensure all management functions aren't NULL

This commit is contained in:
2025-11-25 19:08:00 +00:00
parent 8783361010
commit 9b7a5af6ec

View File

@@ -58,6 +58,11 @@ void prick_btree_init(prick_btree_t *tree, prick_bnode_comp_fn comparator,
prick_bnode_alloc_fn allocator, prick_bnode_free_fn free,
prick_print_fn print)
{
// NOTE: These NEED to be supplied.
assert(comparator);
assert(allocator);
assert(free);
assert(print);
if (tree)
{
tree->root = NULL;