From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754580AbaHNCXS (ORCPT ); Wed, 13 Aug 2014 22:23:18 -0400 Received: from mail4.hitachi.co.jp ([133.145.228.5]:60871 "EHLO mail4.hitachi.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754532AbaHNCW7 (ORCPT ); Wed, 13 Aug 2014 22:22:59 -0400 X-AuditID: 85900ec0-cff26b9000001514-be-53ec1d80af7e Subject: [PATCH 13/13] perf stat: Use strerror_r instead of strerror From: Masami Hiramatsu To: Arnaldo Carvalho de Melo Cc: Naohiro Aota , Peter Zijlstra , LKML , Ingo Molnar , Paul Mackerras , Namhyung Kim Date: Thu, 14 Aug 2014 02:22:55 +0000 Message-ID: <20140814022255.3545.81549.stgit@kbuild-fedora.novalocal> In-Reply-To: <20140814022228.3545.90481.stgit@kbuild-fedora.novalocal> References: <20140814022228.3545.90481.stgit@kbuild-fedora.novalocal> User-Agent: StGit/0.17-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: AAAAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use strerror_r instead of strerror in error message for thread-safety. Signed-off-by: Masami Hiramatsu --- tools/perf/builtin-stat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index 3e80aa1..5fe0edb 100644 --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c @@ -593,7 +593,7 @@ static int __run_perf_stat(int argc, const char **argv) if (perf_evlist__apply_filters(evsel_list)) { error("failed to set filter with %d (%s)\n", errno, - strerror(errno)); + strerror_r(errno, msg, sizeof(msg))); return -1; }