[PATCH 28/43] perf strfilter: Use skip_spaces()

From: Arnaldo Carvalho de Melo
Date: Mon Jul 01 2019 - 22:27:56 EST


From: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>

No change in behaviour.

Cc: Adrian Hunter <adrian.hunter@xxxxxxxxx>
Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
Cc: Masami Hiramatsu <mhiramat@xxxxxxxxxx>
Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
Link: https://lkml.kernel.org/n/tip-p9rtamq7lvre9zhti70azfwe@xxxxxxxxxxxxxx
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
tools/perf/util/strfilter.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/perf/util/strfilter.c b/tools/perf/util/strfilter.c
index 2c3a2904ebcd..90ea2b209cbb 100644
--- a/tools/perf/util/strfilter.c
+++ b/tools/perf/util/strfilter.c
@@ -5,6 +5,7 @@

#include <errno.h>
#include <linux/ctype.h>
+#include <linux/string.h>

/* Operators */
static const char *OP_and = "&"; /* Logical AND */
@@ -37,8 +38,7 @@ static const char *get_token(const char *s, const char **e)
{
const char *p;

- while (isspace(*s)) /* Skip spaces */
- s++;
+ s = skip_spaces(s);

if (*s == '\0') {
p = s;
--
2.20.1