From: Masami Hiramatsu Date: Thu, 14 Aug 2014 02:22:38 +0000 (+0000) Subject: perf top: Use strerror_r instead of strerror X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=809adea685f7dbc9bdcc38b27d24801c461d8413;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git perf top: Use strerror_r instead of strerror Use strerror_r instead of strerror in error message for thread-safety. Signed-off-by: Masami Hiramatsu Cc: Ingo Molnar Cc: Namhyung Kim Cc: Naohiro Aota Cc: Paul Mackerras Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20140814022238.3545.15569.stgit@kbuild-fedora.novalocal Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index 87a6615a40fa..a77ff6ca5fbd 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c @@ -899,7 +899,7 @@ try_again: if (perf_evlist__mmap(evlist, opts->mmap_pages, false) < 0) { ui__error("Failed to mmap with %d (%s)\n", - errno, strerror(errno)); + errno, strerror_r(errno, msg, sizeof(msg))); goto out_err; }