tools lib traceevent: Fix kbuffer_read_at_offset()
authorNamhyung Kim <namhyung@kernel.org>
Sat, 1 Oct 2016 10:17:00 +0000 (19:17 +0900)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 5 Oct 2016 14:36:22 +0000 (11:36 -0300)
commita130347973c408c0e0017a52c74cbc3226c1f0ef
tree3e4220aa0ef7c084300abf8b8a9f1614417b360a
parent3bccbe20f6d188ce7b00326e776b745cfd35b10a
tools lib traceevent: Fix kbuffer_read_at_offset()

When it's called with an offset less than or equal to the first event,
it'll return a garbage value since the data is not initialized.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20161001101700.29146-1-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/lib/traceevent/kbuffer-parse.c