projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
810826a
)
perf header: Use skip_spaces() in __write_cpudesc()
author
Arnaldo Carvalho de Melo
<acme@redhat.com>
Wed, 26 Jun 2019 00:33:14 +0000
(21:33 -0300)
committer
Arnaldo Carvalho de Melo
<acme@redhat.com>
Wed, 26 Jun 2019 00:34:31 +0000
(21:34 -0300)
No change in behaviour.
Cc: Stephane Eranian <eranian@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link:
https://lkml.kernel.org/n/tip-0dbfpi70aa66s6mtd8z6p391@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/header.c
patch
|
blob
|
history
diff --git
a/tools/perf/util/header.c
b/tools/perf/util/header.c
index fca9dbaf61ae5edd874bef5d330a4888f1831a8a..1eb15f7517b061cf05b256fbdb6ccabf169cea5f 100644
(file)
--- a/
tools/perf/util/header.c
+++ b/
tools/perf/util/header.c
@@
-13,6
+13,7
@@
#include <linux/list.h>
#include <linux/kernel.h>
#include <linux/bitops.h>
+#include <linux/string.h>
#include <linux/stringify.h>
#include <sys/stat.h>
#include <sys/utsname.h>
@@
-416,10
+417,8
@@
static int __write_cpudesc(struct feat_fd *ff, const char *cpuinfo_proc)
while (*p) {
if (isspace(*p)) {
char *r = p + 1;
- char *q =
r
;
+ char *q =
skip_spaces(r)
;
*p = ' ';
- while (*q && isspace(*q))
- q++;
if (q != (p+1))
while ((*r++ = *q++));
}