[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z4U11bKn3zJjLQij@x1>
Date: Mon, 13 Jan 2025 12:48:37 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: James Clark <james.clark@...aro.org>
Cc: Ian Rogers <irogers@...gle.com>, Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>, Namhyung Kim <namhyung@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...nel.org>,
Adrian Hunter <adrian.hunter@...el.com>,
Kan Liang <kan.liang@...ux.intel.com>,
linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1] perf inject: Fix use without initialization of local
variables
On Wed, Dec 11, 2024 at 09:58:00AM +0000, James Clark wrote:
> On 11/12/2024 6:08 am, Ian Rogers wrote:
> > Local variables were missing initialization and command line
> > processing didn't provide default values.
> >
> > Fixes: 64eed019f3fc ("perf inject: Lazy build-id mmap2 event insertion")
> > Signed-off-by: Ian Rogers <irogers@...gle.com>
> > ---
> > tools/perf/builtin-inject.c | 8 ++++----
> > 1 file changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c
> > index d6989195a061..11e49cafa3af 100644
> > --- a/tools/perf/builtin-inject.c
> > +++ b/tools/perf/builtin-inject.c
> > @@ -2367,10 +2367,10 @@ int cmd_inject(int argc, const char **argv)
> > };
> > int ret;
> > const char *known_build_ids = NULL;
> > - bool build_ids;
> > - bool build_id_all;
> > - bool mmap2_build_ids;
> > - bool mmap2_build_id_all;
> > + bool build_ids = false;
> > + bool build_id_all = false;
> > + bool mmap2_build_ids = false;
> > + bool mmap2_build_id_all = false;
> > struct option options[] = {
> > OPT_BOOLEAN('b', "build-ids", &build_ids,
>
> Reviewed-by: James Clark <james.clark@...aro.org>
Thanks, applied to perf-tools-next,
- Arnaldo
Powered by blists - more mailing lists