lkml.org 
[lkml]   [2016]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 21/66] perf quote: Disentangle headers
Date
From: Arnaldo Carvalho de Melo <acme@redhat.com>

No need to include stdio.h from quote.h, also forward declare strbuf.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-k3kbcxhctpxvz6ckve3kv6c1@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/quote.c | 4 +++-
tools/perf/util/quote.h | 3 ++-
2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/tools/perf/util/quote.c b/tools/perf/util/quote.c
index c6d4ee2de752..639d1da2f978 100644
--- a/tools/perf/util/quote.c
+++ b/tools/perf/util/quote.c
@@ -1,5 +1,7 @@
-#include "cache.h"
+#include <stdlib.h>
+#include "strbuf.h"
#include "quote.h"
+#include "util.h"

/* Help to copy the thing properly quoted for the shell safety.
* any single quote is replaced with '\'', any exclamation point
diff --git a/tools/perf/util/quote.h b/tools/perf/util/quote.h
index e1ec19146fb0..055ca45bed99 100644
--- a/tools/perf/util/quote.h
+++ b/tools/perf/util/quote.h
@@ -2,7 +2,6 @@
#define __PERF_QUOTE_H

#include <stddef.h>
-#include <stdio.h>

/* Help to copy the thing properly quoted for the shell safety.
* any single quote is replaced with '\'', any exclamation point
@@ -24,6 +23,8 @@
* sq_quote() in a real application.
*/

+struct strbuf;
+
int sq_quote_argv(struct strbuf *, const char **argv, size_t maxlen);

#endif /* __PERF_QUOTE_H */
--
2.7.4
\
 
 \ /
  Last update: 2016-07-13 01:41    [W:0.375 / U:0.396 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site