diff options
-rw-r--r-- | tools/lib/traceevent/event-parse.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c index ef2c65f91677..cdb32c78d150 100644 --- a/tools/lib/traceevent/event-parse.c +++ b/tools/lib/traceevent/event-parse.c | |||
@@ -1592,7 +1592,7 @@ static int get_op_prio(char *op) | |||
1592 | case '?': | 1592 | case '?': |
1593 | return 16; | 1593 | return 16; |
1594 | default: | 1594 | default: |
1595 | die("unknown op '%c'", op[0]); | 1595 | do_warning("unknown op '%c'", op[0]); |
1596 | return -1; | 1596 | return -1; |
1597 | } | 1597 | } |
1598 | } else { | 1598 | } else { |
@@ -1613,22 +1613,22 @@ static int get_op_prio(char *op) | |||
1613 | } else if (strcmp(op, "||") == 0) { | 1613 | } else if (strcmp(op, "||") == 0) { |
1614 | return 15; | 1614 | return 15; |
1615 | } else { | 1615 | } else { |
1616 | die("unknown op '%s'", op); | 1616 | do_warning("unknown op '%s'", op); |
1617 | return -1; | 1617 | return -1; |
1618 | } | 1618 | } |
1619 | } | 1619 | } |
1620 | } | 1620 | } |
1621 | 1621 | ||
1622 | static void set_op_prio(struct print_arg *arg) | 1622 | static int set_op_prio(struct print_arg *arg) |
1623 | { | 1623 | { |
1624 | 1624 | ||
1625 | /* single ops are the greatest */ | 1625 | /* single ops are the greatest */ |
1626 | if (!arg->op.left || arg->op.left->type == PRINT_NULL) { | 1626 | if (!arg->op.left || arg->op.left->type == PRINT_NULL) |
1627 | arg->op.prio = 0; | 1627 | arg->op.prio = 0; |
1628 | return; | 1628 | else |
1629 | } | 1629 | arg->op.prio = get_op_prio(arg->op.op); |
1630 | 1630 | ||
1631 | arg->op.prio = get_op_prio(arg->op.op); | 1631 | return arg->op.prio; |
1632 | } | 1632 | } |
1633 | 1633 | ||
1634 | /* Note, *tok does not get freed, but will most likely be saved */ | 1634 | /* Note, *tok does not get freed, but will most likely be saved */ |
@@ -1710,7 +1710,10 @@ process_op(struct event_format *event, struct print_arg *arg, char **tok) | |||
1710 | arg->op.op = token; | 1710 | arg->op.op = token; |
1711 | arg->op.left = left; | 1711 | arg->op.left = left; |
1712 | 1712 | ||
1713 | set_op_prio(arg); | 1713 | if (set_op_prio(arg) == -1) { |
1714 | event->flags |= EVENT_FL_FAILED; | ||
1715 | goto out_free; | ||
1716 | } | ||
1714 | 1717 | ||
1715 | type = read_token_item(&token); | 1718 | type = read_token_item(&token); |
1716 | *tok = token; | 1719 | *tok = token; |