perf expr: Make expr__parse() return -1 on error
To match the error value of the expr__find_other function, so all exported expr functions return the same values: 0 on success, -1 on error. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Reviewed-by: Andi Kleen <ak@linux.intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: John Garry <john.garry@huawei.com> Cc: Kajol Jain <kjain@linux.ibm.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Ravi Bangoria <ravi.bangoria@linux.ibm.com> Link: http://lore.kernel.org/lkml/20200228093616.67125-6-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:

committed by
Arnaldo Carvalho de Melo

parent
0f9b1e124b
commit
d942815a76
@@ -54,7 +54,7 @@ __expr__parse(double *val, struct parse_ctx *ctx, const char *expr,
|
||||
|
||||
int expr__parse(double *final_val, struct parse_ctx *ctx, const char *expr)
|
||||
{
|
||||
return __expr__parse(final_val, ctx, expr, EXPR_PARSE);
|
||||
return __expr__parse(final_val, ctx, expr, EXPR_PARSE) ? -1 : 0;
|
||||
}
|
||||
|
||||
static bool
|
||||
|
Reference in New Issue
Block a user