From b62c06eba769ffd922c636a1f014cdbc60cac7c6 Mon Sep 17 00:00:00 2001 From: Michal Utlak Date: Tue, 23 Apr 2024 19:34:49 +0200 Subject: [PATCH] skuska 2 --- a3/binary_search_tree.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/a3/binary_search_tree.c b/a3/binary_search_tree.c index f5ff94e..b39fa0a 100644 --- a/a3/binary_search_tree.c +++ b/a3/binary_search_tree.c @@ -7,11 +7,11 @@ node_t *build_tree(int *tree_data, size_t tree_data_len){ node_t *koren = (node_t *)malloc(sizeof(node_t)); - if(tree_data == NULL || tree_data_len == NULL){ + if(tree_data == NULL || tree_data_len == 0){ return 0; } - if(tree_data != NULL && tree_data_len != NULL){ + if(tree_data != NULL && tree_data_len != 0){ koren->data = tree_data[0]; koren->left = tree_data[0]; }