skuska 2
This commit is contained in:
parent
af003ab578
commit
b62c06eba7
@ -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));
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(tree_data != NULL && tree_data_len != NULL){
|
if(tree_data != NULL && tree_data_len != 0){
|
||||||
koren->data = tree_data[0];
|
koren->data = tree_data[0];
|
||||||
koren->left = tree_data[0];
|
koren->left = tree_data[0];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user