Skip to contentSkip to conversation

perf evsel: Fix format string in perf_evsel__open_strerror()

PATCH New Namhyung Kim 1 participant 1 message Mar 22, 2013 perf events

lore
Share & tools
lore

Namhyung Kim

author maintainer
#0 lore raw

PATCH 1/1 perf evsel: Fix format string in perf_evsel__open_strerror()

From: Namhyung Kim <[email protected]>

In case of EPERM or EACCESS, there was a debious "%s" before actual string so that an user would see "You may not have permission to collect %sstats." instead of "You may not ... system-wide stats.".

---
 tools/perf/util/evsel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/util/evsel.c +1 -1
index 1adb824610f0..b190d57e926e 100644
@@ -1495,7 +1495,7 @@ int perf_evsel__open_strerror(struct perf_evsel *evsel,
 	switch (err) {
 	case EPERM:
 	case EACCES:
-		return scnprintf(msg, size, "%s",
+		return scnprintf(msg, size,
 		 "You may not have permission to collect %sstats.\n"
 		 "Consider tweaking /proc/sys/kernel/perf_event_paranoid:\n"
 		 " -1 - Not paranoid at all\n"
Signature · 1 line
1.7.11.7