Fix: filter: check binary op nesting
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 7 Jan 2014 21:24:53 +0000 (21:24 +0000)
committerDavid Goulet <dgoulet@efficios.com>
Tue, 7 Jan 2014 21:34:18 +0000 (16:34 -0500)
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 <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/lib/lttng-ctl/filter/filter-visitor-ir-check-binary-op-nesting.c

index 4db5ec93d53e5c1be9ab60e739782bb6898fd193..e093957c270422a0ee19221cbaffa755148c5f9c 100644 (file)
@@ -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:
        {
This page took 0.025404 seconds and 4 git commands to generate.