From: tip-bot for Colin Ian King <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: mhiramat@kernel.org, colin.king@canonical.com,
ravi.bangoria@linux.vnet.ibm.com, acme@redhat.com,
wangnan0@huawei.com, tglx@linutronix.de, mingo@kernel.org,
hpa@zytor.com, alexander.shishkin@linux.intel.com,
linux-kernel@vger.kernel.org, peterz@infradead.org
Subject: [tip:perf/urgent] perf probe: Check if *ptr2 is zero and not ptr2
Date: Tue, 4 Oct 2016 01:09:47 -0700 [thread overview]
Message-ID: <tip-ead1a57457c0324a167f3f9e3a70e26c2d75fb12@git.kernel.org> (raw)
In-Reply-To: <20161003103431.18534-1-colin.king@canonical.com>
Commit-ID: ead1a57457c0324a167f3f9e3a70e26c2d75fb12
Gitweb: http://git.kernel.org/tip/ead1a57457c0324a167f3f9e3a70e26c2d75fb12
Author: Colin Ian King <colin.king@canonical.com>
AuthorDate: Mon, 3 Oct 2016 11:34:31 +0100
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 3 Oct 2016 11:24:12 -0300
perf probe: Check if *ptr2 is zero and not ptr2
Static anaylsis with cppcheck[1] detected an incorrect comparison:
[tools/perf/util/probe-event.c:216]: (warning) Char literal compared
with pointer 'ptr2'. Did you intend to dereference it?
Dereference ptr2 for the comparison to fix this.
1: https://sourceforge.net/p/cppcheck/wiki/Home/
Signed-off-by: Colin King <colin.king@canonical.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
Cc: Wang Nan <wangnan0@huawei.com>
Fixes: 35726d3a4ca9 ("perf probe: Fix to cut off incompatible chars from group name")
Link: http://lkml.kernel.org/r/20161003103431.18534-1-colin.king@canonical.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/probe-event.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index fcfbef0..d281ae2 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -213,7 +213,7 @@ static int convert_exec_to_group(const char *exec, char **result)
goto out;
}
- for (ptr2 = ptr1; ptr2 != '\0'; ptr2++) {
+ for (ptr2 = ptr1; *ptr2 != '\0'; ptr2++) {
if (!isalnum(*ptr2) && *ptr2 != '_') {
*ptr2 = '\0';
break;
prev parent reply other threads:[~2016-10-04 8:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-03 10:34 [PATCH] perf probe: check " Colin King
2016-10-03 11:19 ` Arnaldo Carvalho de Melo
2016-10-03 11:22 ` Colin Ian King
2016-10-03 11:45 ` Arnaldo Carvalho de Melo
2016-10-04 2:28 ` Masami Hiramatsu
2016-10-04 8:09 ` tip-bot for Colin Ian King [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-ead1a57457c0324a167f3f9e3a70e26c2d75fb12@git.kernel.org \
--to=tipbot@zytor.com \
--cc=acme@redhat.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=colin.king@canonical.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=ravi.bangoria@linux.vnet.ibm.com \
--cc=tglx@linutronix.de \
--cc=wangnan0@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome