2021-03-15 07:54:48

by Yang Li

[permalink] [raw]
Subject: [PATCH] perf tools: use true and false for bool variable

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 <[email protected]>
Signed-off-by: Yang Li <[email protected]>
---
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