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>
This commit is contained in:

committed by
Arnaldo Carvalho de Melo

parent
b72ca40390
commit
70a6898fdc
@@ -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 */
|
||||
|
Reference in New Issue
Block a user