From caf58132eba34fd9a8a2ac1bef4bc63693645bb4 Mon Sep 17 00:00:00 2001 From: "alec.schmidt" <alec.schmidt@etu.hesge.ch> Date: Sat, 28 May 2022 17:23:24 +0200 Subject: [PATCH] Return CONST_CONTR au lieu de control v.value = 0; --- bp_tree.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bp_tree.c b/bp_tree.c index fb05384..73d5775 100644 --- a/bp_tree.c +++ b/bp_tree.c @@ -78,10 +78,10 @@ control bp_insert_into(node *nd, control val) } nd->count++; - control v; - v.value = 0; + if (nd->count == M) { + control v; node *new = bp_split(nd); v.lhs = nd; v.rhs = new; @@ -90,7 +90,7 @@ control bp_insert_into(node *nd, control val) nd->next = new; return v; } - return v; + return CONST_CONTR; } control bp_insert(node *nd, control val){ @@ -261,4 +261,4 @@ void bp_print(node *nd, int depth) return bp_print(nd->childs[i+1], depth + 1); } } -} \ No newline at end of file +} -- GitLab