Fix _min & _max for B+Tree

Make code match the documentation if there is no element in the tree.
This commit is contained in:
Patrick Pelissier committed 2021-02-23 15:59:45 +01:00
1 parent 5cd6c1dd36
commit 8e9aa9cac4
2 files changed
+7 -1

No files matched your search

+3
View File
@@ -350,6 +350,9 @@ static void test5(void)
btree_t b;
btree_init(b);
assert (btree_cmin(b) == NULL);
assert (btree_cmax(b) == NULL);
for(int i = 0; i < 1000; i+=3)
btree_set_at(b, i, 1000*i);
for(int i = 1; i < 1000; i+=3)