Skip to contentSkip to conversation

perf tools: use true and false for bool variable

PATCH New Yang Li 1 participant 1 message Mar 15, 2021 perf events

lore
Share & tools
lore

Yang Li

author
#0 lore raw

PATCH 1/1 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

---
 tools/perf/util/jitdump.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/util/jitdump.c +1 -1
index 9760d8e..f49a659 100644
@@ -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;
 }
Signature · 1 line
1.8.3.1