Fix incorrect enum comparisons.

This commit is contained in:
Danila Fedorin 2017-06-22 14:40:37 -07:00
parent d2f2314b4e
commit bf85cdeca9
1 changed files with 2 additions and 2 deletions

View File

@ -71,7 +71,7 @@ liblex_result _eval_pairmap_add_node(ht *table, pattern_node *node){
result = _eval_pairmap_add_node(table, _eval_pattern_node_get_next(node));
} else if(node->type == PNODE_FORK){
result = _eval_pairmap_add_node(table, node->data_u.fork_s.left);
if(result == LIBDS_SUCCESS){
if(result == LIBLEX_SUCCESS){
result = _eval_pairmap_add_node(table, node->data_u.fork_s.right);
}
}
@ -114,7 +114,7 @@ int _eval_foreach_check_node(void *data, va_list args){
new_match->to = evl->index;
new_match->pattern = node->pattern_id;
return_code = ll_append(&evl->matches, new_match) == LIBLEX_SUCCESS ? 0 : EVAL_FOREACH_MALLOC;
return_code = ll_append(&evl->matches, new_match) == LIBDS_SUCCESS ? 0 : EVAL_FOREACH_MALLOC;
if(return_code){
free(new_match);
}