Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf quote: Disentangle headers

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>

+5 -2
+3 -1
tools/perf/util/quote.c
··· 1 - #include "cache.h" 1 + #include <stdlib.h> 2 + #include "strbuf.h" 2 3 #include "quote.h" 4 + #include "util.h" 3 5 4 6 /* Help to copy the thing properly quoted for the shell safety. 5 7 * any single quote is replaced with '\'', any exclamation point
+2 -1
tools/perf/util/quote.h
··· 2 2 #define __PERF_QUOTE_H 3 3 4 4 #include <stddef.h> 5 - #include <stdio.h> 6 5 7 6 /* Help to copy the thing properly quoted for the shell safety. 8 7 * any single quote is replaced with '\'', any exclamation point ··· 22 23 * Note that the above examples leak memory! Remember to free result from 23 24 * sq_quote() in a real application. 24 25 */ 26 + 27 + struct strbuf; 25 28 26 29 int sq_quote_argv(struct strbuf *, const char **argv, size_t maxlen); 27 30