diff options
author | Masami Hiramatsu <mhiramat@kernel.org> | 2016-05-10 07:47:26 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-05-10 16:56:52 +0200 |
commit | 70a6898fdc11272249622f77b034f47f1e9adb35 (patch) | |
tree | cafe8a11fbe568c8816f42041e3bacaafa0650e2 /tools/perf/util/quote.h | |
parent | perf help: Make check_emacsclient_version to check strbuf APIs (diff) | |
download | linux-70a6898fdc11272249622f77b034f47f1e9adb35.tar.xz linux-70a6898fdc11272249622f77b034f47f1e9adb35.zip |
perf tools: Make alias handler to check return value of strbuf
Make alias handler and sq_quote_argv to check the return value of strbuf
APIs.
In sq_quote_argv() calls die(), but this fix handles strbuf failure as a
special case and returns to caller, since the caller - handle_alias()
also has to check the return value of other strbuf APIs and those checks
can be merged to one if() statement.
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20160510054725.6158.84597.stgit@devbox
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/quote.h')
-rw-r--r-- | tools/perf/util/quote.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/quote.h b/tools/perf/util/quote.h index 3340c9c4a6ca..e1ec19146fb0 100644 --- a/tools/perf/util/quote.h +++ b/tools/perf/util/quote.h @@ -24,6 +24,6 @@ * sq_quote() in a real application. */ -void sq_quote_argv(struct strbuf *, const char **argv, size_t maxlen); +int sq_quote_argv(struct strbuf *, const char **argv, size_t maxlen); #endif /* __PERF_QUOTE_H */ |