aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiapeng Chong <[email protected]>2021-03-09 10:11:09 +0000
committerArnaldo Carvalho de Melo <[email protected]>2021-03-09 12:09:45 +0000
commit83ff0f93b0803700b018f6cce06f50439dc1348c (patch)
treed29e8bf620f8f64d4e77e7dd9ee932207c050c54
parentperf tools: use ARRAY_SIZE (diff)
downloadkernel-83ff0f93b0803700b018f6cce06f50439dc1348c.tar.gz
kernel-83ff0f93b0803700b018f6cce06f50439dc1348c.zip
perf machine: Assign boolean values to a bool variable
Fix the following coccicheck warnings: ./tools/perf/util/machine.c:2041:9-10: WARNING: return of 0/1 in function 'symbol__match_regex' with return type bool. Reported-by: Abaci Robot <[email protected]> Signed-off-by: Jiapeng Chong <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Alexei Starovoitov <[email protected]> Cc: Andrii Nakryiko <[email protected]> Cc: Daniel Borkmann <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: John Fastabend <[email protected]> Cc: KP Singh <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Martin KaFai Lau <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Song Liu <[email protected]> Cc: Yonghong Song <[email protected]> Cc: [email protected] Cc: [email protected] Link: http://lore.kernel.org/lkml/1615284669-82139-1-git-send-email-jiapeng.chong@linux.alibaba.com Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-rw-r--r--tools/perf/util/machine.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index b5c2d8be4144..435771eed62b 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -2038,8 +2038,8 @@ int machine__process_event(struct machine *machine, union perf_event *event,
static bool symbol__match_regex(struct symbol *sym, regex_t *regex)
{
if (!regexec(regex, sym->name, 0, NULL, 0))
- return 1;
- return 0;
+ return true;
+ return false;
}
static void ip__resolve_ams(struct thread *thread,