* [PATCH] perf tools: use true and false for bool variable
@ 2021-03-15 7:51 Yang Li
0 siblings, 0 replies; only message in thread
From: Yang Li @ 2021-03-15 7:51 UTC (permalink / raw)
To: peterz
Cc: mingo, acme, mark.rutland, alexander.shishkin, jolsa, namhyung,
linux-kernel, Yang Li
fixed the following coccicheck:
./tools/perf/util/jitdump.c:803:9-10: WARNING: return of 0/1 in function
'jit_has_pid' with return type bool
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
tools/perf/util/jitdump.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/jitdump.c b/tools/perf/util/jitdump.c
index 9760d8e..f49a659 100644
--- a/tools/perf/util/jitdump.c
+++ b/tools/perf/util/jitdump.c
@@ -800,7 +800,7 @@ static bool jit_has_pid(struct machine *machine, pid_t pid)
struct thread *thread = machine__find_thread(machine, pid, pid);
if (!thread)
- return 0;
+ return false;
return (bool)thread->priv;
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-03-15 7:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-15 7:51 [PATCH] perf tools: use true and false for bool variable Yang Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).