Skip to content

Commit 8e246a1

Browse files
captain5050acmel
authored andcommitted
perf inject: Fix use without initialization of local variables
Local variables were missing initialization and command line processing didn't provide default values. Fixes: 64eed01 ("perf inject: Lazy build-id mmap2 event insertion") Reviewed-by: James Clark <james.clark@linaro.org> Signed-off-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20241211060831.806539-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 6804a71 commit 8e246a1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tools/perf/builtin-inject.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2367,10 +2367,10 @@ int cmd_inject(int argc, const char **argv)
23672367
};
23682368
int ret;
23692369
const char *known_build_ids = NULL;
2370-
bool build_ids;
2371-
bool build_id_all;
2372-
bool mmap2_build_ids;
2373-
bool mmap2_build_id_all;
2370+
bool build_ids = false;
2371+
bool build_id_all = false;
2372+
bool mmap2_build_ids = false;
2373+
bool mmap2_build_id_all = false;
23742374

23752375
struct option options[] = {
23762376
OPT_BOOLEAN('b', "build-ids", &build_ids,

0 commit comments

Comments
 (0)