Commit ff533fc0 authored by Namhyung Kim's avatar Namhyung Kim Committed by Arnaldo Carvalho de Melo

tools lib traceevent: Make add_left() return pevent_errno

So that it can propagate error properly.
Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/1386833777-3790-8-git-send-email-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 02d62d6d
...@@ -648,7 +648,7 @@ rotate_op_right(struct filter_arg *a, struct filter_arg *b) ...@@ -648,7 +648,7 @@ rotate_op_right(struct filter_arg *a, struct filter_arg *b)
return arg; return arg;
} }
static int add_left(struct filter_arg *op, struct filter_arg *arg) static enum pevent_errno add_left(struct filter_arg *op, struct filter_arg *arg)
{ {
switch (op->type) { switch (op->type) {
case FILTER_ARG_EXP: case FILTER_ARG_EXP:
...@@ -667,11 +667,11 @@ static int add_left(struct filter_arg *op, struct filter_arg *arg) ...@@ -667,11 +667,11 @@ static int add_left(struct filter_arg *op, struct filter_arg *arg)
/* left arg of compares must be a field */ /* left arg of compares must be a field */
if (arg->type != FILTER_ARG_FIELD && if (arg->type != FILTER_ARG_FIELD &&
arg->type != FILTER_ARG_BOOLEAN) arg->type != FILTER_ARG_BOOLEAN)
return -1; return PEVENT_ERRNO__INVALID_ARG_TYPE;
op->num.left = arg; op->num.left = arg;
break; break;
default: default:
return -1; return PEVENT_ERRNO__INVALID_ARG_TYPE;
} }
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment