[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <53D96FBB.4010907@gmail.com>
Date: Wed, 30 Jul 2014 16:20:43 -0600
From: David Ahern <dsahern@...il.com>
To: Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
Namhyung Kim <namhyung@...nel.org>
CC: Minchan Kim <minchan@...nel.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Ingo Molnar <mingo@...nel.org>,
Paul Mackerras <paulus@...ba.org>,
Namhyung Kim <namhyung.kim@....com>,
LKML <linux-kernel@...r.kernel.org>, Jiri Olsa <jolsa@...hat.com>
Subject: Re: [PATCH 1/2] perf tools: Ensure --symfs ends with '/'
On 7/30/14, 2:55 PM, Arnaldo Carvalho de Melo wrote:
> @@ -143,6 +144,14 @@ struct symbol_conf {
> };
>
> extern struct symbol_conf symbol_conf;
> +
> +static inline int __symbol__join_symfs(char *bf, size_t size, const char *path)
> +{
> + return path__join(bf, size, symbol_conf.symfs, path);
> +}
> +
> +#define symbol__join_symfs(bf, path) __symbol__join_symfs(bf, sizeof(bf), path)
> +
> extern int vmlinux_path__nr_entries;
> extern char **vmlinux_path;
>
I am not comfortable with the sizeof(bf) in the macro there. It is to a
large degree hiding an important detail and sets up odd failures in the
future. ie., It works fine for 'char bf[N];' but not for 'char *bf =
"some string";'.
David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists