X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;ds=sidebyside;f=expr.c;h=32205091b345df1ca82f3ad6b5989e14616a40cb;hb=refs%2Ftags%2Fsubmit%2Ftizen_3.0.m2%2F20170104.093753;hp=4059a32cda42cb3c62b0e3a865f5dd2a170a2064;hpb=f75acf01de7f4614a58c5b76021214bf243cf523;p=platform%2Fupstream%2Fltrace.git diff --git a/expr.c b/expr.c index 4059a32..3220509 100644 --- a/expr.c +++ b/expr.c @@ -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");