From: Mathieu Desnoyers Date: Tue, 7 Jan 2014 21:24:53 +0000 (+0000) Subject: Fix: filter: check binary op nesting X-Git-Tag: v2.5.0-rc1~266 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=29190311dc1cc94817863fab99efe74eefbb780b;p=lttng-tools.git Fix: filter: check binary op nesting Should pass nesting + 1 as parameter rather than nesting++. Worked in when nesting was in one direction (due to side-effect of the first ++), but not the other. Fixes #688 Signed-off-by: Mathieu Desnoyers Signed-off-by: David Goulet --- diff --git a/src/lib/lttng-ctl/filter/filter-visitor-ir-check-binary-op-nesting.c b/src/lib/lttng-ctl/filter/filter-visitor-ir-check-binary-op-nesting.c index 4db5ec93d..e093957c2 100644 --- a/src/lib/lttng-ctl/filter/filter-visitor-ir-check-binary-op-nesting.c +++ b/src/lib/lttng-ctl/filter/filter-visitor-ir-check-binary-op-nesting.c @@ -58,11 +58,11 @@ int check_bin_op_nesting_recursive(struct ir_op *node, int nesting) return -EINVAL; } ret = check_bin_op_nesting_recursive(node->u.binary.left, - nesting++); + nesting + 1); if (ret) return ret; return check_bin_op_nesting_recursive(node->u.binary.right, - nesting++); + nesting + 1); } case IR_OP_LOGICAL: {