Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1594947
| From | Masami Hiramatsu <mhiramat@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/2] perf probe: Fix concat_probe_trace_events |
| Date | 2017-03-08 09:50 +0100 |
| Message-ID | <tiFse-3Rn-15@gated-at.bofh.it> (permalink) |
| References | <tiFsf-3Rn-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, 8 Mar 2017 12:29:07 +0530
Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> wrote:
> '*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'.
Oops, good catch!
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Thanks!
>
> Fixes: 42bba263eb58 ("perf probe: Allow wildcard for cached events")
> Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
> ---
> tools/perf/util/probe-event.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
> index 28fb62c..4f9d6ee 100644
> --- a/tools/perf/util/probe-event.c
> +++ b/tools/perf/util/probe-event.c
> @@ -3057,7 +3057,7 @@ concat_probe_trace_events(struct probe_trace_event **tevs, int *ntevs,
> struct probe_trace_event *new_tevs;
> int ret = 0;
>
> - if (ntevs == 0) {
> + if (*ntevs == 0) {
> *tevs = *tevs2;
> *ntevs = ntevs2;
> *tevs2 = NULL;
> --
> 2.9.3
>
--
Masami Hiramatsu <mhiramat@kernel.org>
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
Re: [PATCH 1/2] perf probe: Fix concat_probe_trace_events Masami Hiramatsu <mhiramat@kernel.org> - 2017-03-08 09:50 +0100
csiph-web