perf tools: Rewrite strbuf not to die()
authorMasami Hiramatsu <mhiramat@kernel.org>
Tue, 10 May 2016 05:46:58 +0000 (14:46 +0900)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 10 May 2016 14:27:58 +0000 (11:27 -0300)
commit5cea57f30a12443c05e0c5273f35d2fcef00d30a
treeba665d63c69cc0ea73c0d6e8d622a4872c3a2b6e
parent9c7b37cd63d0d910c531233209286f169993cbd9
perf tools: Rewrite strbuf not to die()

Rewrite strbuf implementation not to use die() nor xrealloc().  Instead
of die(), now most of the API returns error code or 0 if succeeded.

Suggested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
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/20160510054658.6158.24080.stgit@devbox
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/strbuf.c
tools/perf/util/strbuf.h