cv8
This commit is contained in:
parent
736137abbe
commit
997d68724f
@ -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.
|
* @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){
|
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;
|
return NULL;
|
||||||
|
|
||||||
struct binary* itrNode = myTree;
|
struct binary* itrNode = myTree;
|
||||||
@ -113,6 +113,8 @@ struct binary* questionAppend(struct binary* myTree, char* question){
|
|||||||
endingFound = true;
|
endingFound = true;
|
||||||
return itrNode2;
|
return itrNode2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user