perf probe: Fix concat_probe_trace_events
authorRavi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
Wed, 8 Mar 2017 06:59:07 +0000 (12:29 +0530)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 20 Mar 2017 18:01:32 +0000 (15:01 -0300)
commitf0a30dca5f84fe8048271799b56677ac2279de66
treeb30baced20b5a9459c25393fcd44563488138172
parentefc9c05681c589ed942bf8c55a774853938ca8d4
perf probe: Fix concat_probe_trace_events

'*ntevs' contains number of elements present in 'tevs' array. If there
are no elements in array, 'tevs2' can be directly assigned to 'tevs'
without allocating more space. So the condition should be  '*ntevs == 0'
not  'ntevs == 0'.

Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Fixes: 42bba263eb58 ("perf probe: Allow wildcard for cached events")
Link: http://lkml.kernel.org/r/20170308065908.4128-1-ravi.bangoria@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/probe-event.c