Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf tools: Assign default value for some pointers

Assign default value for pointers that are identified by the compiler as
non-initialized.

Signed-off-by: Martin Liska <mliska@suse.cz>
Acked-by: Ingo Molnar <mingo@kernel.org>
Link: http://lkml.kernel.org/r/5564393C.1090104@suse.cz
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Martin Liška and committed by
Arnaldo Carvalho de Melo
5bcaaca3 4bb7123d

+3 -3
+1 -1
tools/perf/arch/common.c
··· 61 61 static bool lookup_path(char *name) 62 62 { 63 63 bool found = false; 64 - char *path, *tmp; 64 + char *path, *tmp = NULL; 65 65 char buf[PATH_MAX]; 66 66 char *env = getenv("PATH"); 67 67
+1 -1
tools/perf/util/symbol.c
··· 398 398 const char *name) 399 399 { 400 400 struct rb_node *n; 401 - struct symbol_name_rb_node *s; 401 + struct symbol_name_rb_node *s = NULL; 402 402 403 403 if (symbols == NULL) 404 404 return NULL;
+1 -1
tools/perf/util/trace-event-parse.c
··· 173 173 char *line; 174 174 char *next = NULL; 175 175 char *addr_str; 176 - char *fmt; 176 + char *fmt = NULL; 177 177 178 178 line = strtok_r(file, "\n", &next); 179 179 while (line) {