Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 304978
b: refs/heads/master
c: 14ffde0
h: refs/heads/master
v: v3
  • Loading branch information
Vaibhav Nagarnaik authored and Frederic Weisbecker committed Apr 25, 2012
1 parent 9ca47c7 commit aed29e3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d69afed55be1016c2bcfcb3e00cd5365d2f557f6
refs/heads/master: 14ffde0e966efab6724e2de3ab470b78d4e01109
19 changes: 11 additions & 8 deletions trunk/tools/lib/traceevent/event-parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -1592,7 +1592,7 @@ static int get_op_prio(char *op)
case '?':
return 16;
default:
die("unknown op '%c'", op[0]);
do_warning("unknown op '%c'", op[0]);
return -1;
}
} else {
Expand All @@ -1613,22 +1613,22 @@ static int get_op_prio(char *op)
} else if (strcmp(op, "||") == 0) {
return 15;
} else {
die("unknown op '%s'", op);
do_warning("unknown op '%s'", op);
return -1;
}
}
}

static void set_op_prio(struct print_arg *arg)
static int set_op_prio(struct print_arg *arg)
{

/* single ops are the greatest */
if (!arg->op.left || arg->op.left->type == PRINT_NULL) {
if (!arg->op.left || arg->op.left->type == PRINT_NULL)
arg->op.prio = 0;
return;
}
else
arg->op.prio = get_op_prio(arg->op.op);

arg->op.prio = get_op_prio(arg->op.op);
return arg->op.prio;
}

/* Note, *tok does not get freed, but will most likely be saved */
Expand Down Expand Up @@ -1710,7 +1710,10 @@ process_op(struct event_format *event, struct print_arg *arg, char **tok)
arg->op.op = token;
arg->op.left = left;

set_op_prio(arg);
if (set_op_prio(arg) == -1) {
event->flags |= EVENT_FL_FAILED;
goto out_free;
}

type = read_token_item(&token);
*tok = token;
Expand Down

0 comments on commit aed29e3

Please sign in to comment.