libtraceevent: Fix Branch condition garbage value compiler warning

If *offset equals to zero, it is zero. If not equals to zero, set it to
zero. In any case, it will be zero, so we can omit the condition and so
get rid of the compiler warning:

  libtraceevent/src/event-parse.c:4064:7: warning[core.uninitialized.Branch]: Branch condition evaluates to a garbage value

Instead, let's rather check the pointers for being NULL, in order to
prevent another warning:

  libtraceevent/src/event-parse.c:4064:7: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'offset')

Link: https://lore.kernel.org/linux-trace-devel/20220930111002.6107-4-mpetlan@redhat.com

Signed-off-by: Michael Petlan <mpetlan@redhat.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
1 file changed