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 <[email protected]> Signed-off-by: Ian Rogers <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Kan Liang <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
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)