mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
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 <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Masami Hiramatsu <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Ravi Bangoria <[email protected]>
Cc: Wang Nan <[email protected]>
Fixes: 35726d3a4c ("perf probe: Fix to cut off incompatible chars from group name")
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
This commit is contained in:
parent
41aad2a6d4
commit
ead1a57457
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue