Skip to content

Commit

Permalink
perf tools: Assign default value for some pointers
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Martin Liška authored and Arnaldo Carvalho de Melo committed May 27, 2015
1 parent 4bb7123 commit 5bcaaca
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tools/perf/arch/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const char *const mips_triplets[] = {
static bool lookup_path(char *name)
{
bool found = false;
char *path, *tmp;
char *path, *tmp = NULL;
char buf[PATH_MAX];
char *env = getenv("PATH");

Expand Down
2 changes: 1 addition & 1 deletion tools/perf/util/symbol.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ static struct symbol *symbols__find_by_name(struct rb_root *symbols,
const char *name)
{
struct rb_node *n;
struct symbol_name_rb_node *s;
struct symbol_name_rb_node *s = NULL;

if (symbols == NULL)
return NULL;
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/util/trace-event-parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ void parse_ftrace_printk(struct pevent *pevent,
char *line;
char *next = NULL;
char *addr_str;
char *fmt;
char *fmt = NULL;

line = strtok_r(file, "\n", &next);
while (line) {
Expand Down

0 comments on commit 5bcaaca

Please sign in to comment.