From ca43f2f98281f24748ab21ec3474b4dd783ff618 Mon Sep 17 00:00:00 2001 From: Kozar Date: Tue, 12 Nov 2024 16:22:00 +0000 Subject: [PATCH] Initializacia --- cv7/program.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/cv7/program.c b/cv7/program.c index 835db5e..e7ae045 100644 --- a/cv7/program.c +++ b/cv7/program.c @@ -42,13 +42,7 @@ void run_tree(struct tree* tree) { } if (tree->value[0] == '*') { - // If the node starts with *, check for children - if (tree->left || tree->right) { - printf("Expert z bufetu to vie.\nChybna databaza\n"); - } else { - // If no children, it's the end of a branch - printf("*%s\nKoniec\n", tree->value + 1); - } + printf("*%s\nKoniec\n", tree->value + 1); return; } @@ -70,7 +64,6 @@ void run_tree(struct tree* tree) { } } - void destroy_tree(struct tree* tree) { if (tree->left != NULL) { destroy_tree(tree->left); @@ -107,4 +100,4 @@ int main() { destroy_tree(root); return 0; -} +} \ No newline at end of file