diff options
Diffstat (limited to 'expr.c')
-rw-r--r-- | expr.c | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -229,21 +229,25 @@ expr_clone(struct expr_node *retp, const struct expr_node *node) node->u.call.own_rhs) < 0) return -1; retp->u.call.rhs = nrhs; - /* Fall through. */ - case EXPR_OP_UP: - case EXPR_OP_CALL1: if (expr_alloc_and_clone(&nlhs, node->lhs, node->own_lhs) < 0) { - if (node->kind == EXPR_OP_CALL2 - && node->u.call.own_rhs) { + if (node->u.call.own_rhs) { expr_destroy(nrhs); free(nrhs); - return -1; } + return -1; } retp->lhs = nlhs; return 0; + + case EXPR_OP_UP: + case EXPR_OP_CALL1: + if (expr_alloc_and_clone(&nlhs, node->lhs, node->own_lhs) < 0) + return -1; + + retp->lhs = nlhs; + return 0; } assert(!"Invalid value of node kind"); |