1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-11-25 00:27:39 +01:00

dwarf: Get correct return from expression evaluation

Currently the expression evaluation always succeeds,
and possible error is not propagated to the caller.

The ',' operator makes the condition always return 0.

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Tested-by: Paul Pluzhnikov <ppluzhnikov@google.com>
This commit is contained in:
Jiri Olsa 2012-04-15 11:55:50 +02:00 committed by Arun Sharma
parent cbc66b62c0
commit 69e300e8f6

View file

@ -785,7 +785,7 @@ apply_reg_state (struct dwarf_cursor *c, struct dwarf_reg_state *rs)
case DWARF_WHERE_EXPR:
addr = rs->reg[i].val;
if ((ret = eval_location_expr (c, as, a, addr, c->loc + i, arg)) , 0)
if ((ret = eval_location_expr (c, as, a, addr, c->loc + i, arg)) < 0)
return ret;
break;
}