aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/perf/builtin-report.c2
-rw-r--r--tools/perf/util/util.h1
2 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index cd74b2e58adb..707f60ce32fd 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -1266,7 +1266,7 @@ static void trace_event(event_t *event)
1266 for (j = 0; j < 15-(i & 15); j++) 1266 for (j = 0; j < 15-(i & 15); j++)
1267 cdprintf(" "); 1267 cdprintf(" ");
1268 for (j = 0; j < (i & 15); j++) { 1268 for (j = 0; j < (i & 15); j++) {
1269 if (isprint(raw_event[i-15+j])) 1269 if (issane(raw_event[i-15+j]))
1270 cdprintf("%c", raw_event[i-15+j]); 1270 cdprintf("%c", raw_event[i-15+j]);
1271 else 1271 else
1272 cdprintf("."); 1272 cdprintf(".");
diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h
index 76590a16c271..ce9b514f60a3 100644
--- a/tools/perf/util/util.h
+++ b/tools/perf/util/util.h
@@ -343,6 +343,7 @@ extern unsigned char sane_ctype[256];
343#define isdigit(x) sane_istest(x,GIT_DIGIT) 343#define isdigit(x) sane_istest(x,GIT_DIGIT)
344#define isalpha(x) sane_istest(x,GIT_ALPHA) 344#define isalpha(x) sane_istest(x,GIT_ALPHA)
345#define isalnum(x) sane_istest(x,GIT_ALPHA | GIT_DIGIT) 345#define isalnum(x) sane_istest(x,GIT_ALPHA | GIT_DIGIT)
346#define issane(x) sane_istest(x,GIT_SPACE | GIT_DIGIT | GIT_ALPHA | GIT_GLOB_SPECIAL | GIT_REGEX_SPECIAL)
346#define is_glob_special(x) sane_istest(x,GIT_GLOB_SPECIAL) 347#define is_glob_special(x) sane_istest(x,GIT_GLOB_SPECIAL)
347#define is_regex_special(x) sane_istest(x,GIT_GLOB_SPECIAL | GIT_REGEX_SPECIAL) 348#define is_regex_special(x) sane_istest(x,GIT_GLOB_SPECIAL | GIT_REGEX_SPECIAL)
348#define tolower(x) sane_case((unsigned char)(x), 0x20) 349#define tolower(x) sane_case((unsigned char)(x), 0x20)