From 997d68724f465d666a66951c3b2d7a4d156d1291 Mon Sep 17 00:00:00 2001 From: Oleksandr Hryshchenko Date: Thu, 25 Nov 2021 23:39:37 +0000 Subject: [PATCH] cv8 --- cv8/program.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cv8/program.c b/cv8/program.c index 772d9ca..d5fb57e 100644 --- a/cv8/program.c +++ b/cv8/program.c @@ -44,7 +44,7 @@ struct binary* createBinary(char* name){ * @return – NULL if the node was not yet added, pointer to the new node if the node was added. */ struct binary* productAppend(struct binary* myTree, char* product){ - if(!myTree || (myTree->right != NULL && myTree->left != NULL) && (myTree->left->value[0] == '*' && myTree->right->value[0] == '*')) + if(!myTree || ((myTree->right != NULL && myTree->left != NULL) && (myTree->left->value[0] == '*' && myTree->right->value[0] == '*'))) return NULL; struct binary* itrNode = myTree; @@ -113,6 +113,8 @@ struct binary* questionAppend(struct binary* myTree, char* question){ endingFound = true; return itrNode2; } + + return NULL; }