[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-5bcaaca3e4d15ce39008a0b9c431c0ac4be784bd@git.kernel.org>
Date: Wed, 27 May 2015 09:51:27 -0700
From: "tip-bot for Martin Liška" <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: tglx@...utronix.de, mliska@...e.cz, acme@...hat.com,
linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...nel.org
Subject: [tip:perf/core] perf tools:
Assign default value for some pointers
Commit-ID: 5bcaaca3e4d15ce39008a0b9c431c0ac4be784bd
Gitweb: http://git.kernel.org/tip/5bcaaca3e4d15ce39008a0b9c431c0ac4be784bd
Author: Martin Liška <mliska@...e.cz>
AuthorDate: Tue, 26 May 2015 11:41:37 -0300
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Wed, 27 May 2015 12:21:45 -0300
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@...e.cz>
Acked-by: Ingo Molnar <mingo@...nel.org>
Link: http://lkml.kernel.org/r/5564393C.1090104@suse.cz
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/arch/common.c | 2 +-
tools/perf/util/symbol.c | 2 +-
tools/perf/util/trace-event-parse.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/perf/arch/common.c b/tools/perf/arch/common.c
index 49776f1..b7bb42c 100644
--- a/tools/perf/arch/common.c
+++ b/tools/perf/arch/common.c
@@ -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");
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 00b6b17..b9e3eb5 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -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;
diff --git a/tools/perf/util/trace-event-parse.c b/tools/perf/util/trace-event-parse.c
index 25d6c73..d495741 100644
--- a/tools/perf/util/trace-event-parse.c
+++ b/tools/perf/util/trace-event-parse.c
@@ -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) {
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists