lkml.org 
[lkml]   [2017]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 01/11] perf, tools: Factor out scale conversion code
On Tue, Jan 03, 2017 at 07:08:23AM -0800, Andi Kleen wrote:

SNIP

> - goto error;
> -
> - if (scale[sret - 1] == '\n')
> - scale[sret - 1] = '\0';
> - else
> - scale[sret] = '\0';
> + int ret = 0;
>
> /*
> * save current locale
> @@ -133,8 +111,8 @@ static int perf_pmu__parse_scale(struct perf_pmu_alias *alias, char *dir, char *
> */
> lc = strdup(lc);
> if (!lc) {
> - ret = -ENOMEM;
> - goto error;
> + ret = -1;
> + goto out;

not sure why you changed the -ENOMEM to -1 ;-) but it's ok anyway

Acked-by: Jiri Olsa <jolsa@kernel.org>

thanks,
jirka

\
 
 \ /
  Last update: 2017-01-08 19:58    [W:1.234 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site