aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTucker Evans <tucker@tuckerevans.com>2020-07-08 21:00:23 -0400
committerTucker Evans <tucker@tuckerevans.com>2020-07-08 21:00:23 -0400
commit86a0b0c0c9cf0674b55477a52ae80ef5635bbf64 (patch)
tree0e4bff363a7ae2b37ccfc9104f376cff91d56d41
parent4652a276ff53cc56863e26a3c6f852637257a959 (diff)
Fix map size was returning +1 for NULL leaves
-rw-r--r--collections/map/map.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/collections/map/map.c b/collections/map/map.c
index f5751b5..021743d 100644
--- a/collections/map/map.c
+++ b/collections/map/map.c
@@ -90,7 +90,7 @@ int map_size_aux(root)
struct map_node *root;
{
if (!root)
- return 1;
+ return 0;
return map_size_aux(root->left) + map_size_aux(root->right) + 1;
}