Skip to contentSkip to conversation

perf annotate: Remove unneeded conversion to bool

PATCH Applied Jason Yan 2 participants 2 messages Apr 20, 2020 perf events

lore
Share & tools
lore

Jason Yan

author
#0 lore raw

PATCH 1/1 perf annotate: Remove unneeded conversion to bool

The '>' expression itself is bool, no need to convert it to bool again. This fixes the following coccicheck warning:

tools/perf/ui/browsers/annotate.c:212:30-35: WARNING: conversion to bool not needed here

---
 tools/perf/ui/browsers/annotate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/ui/browsers/annotate.c +1 -1
index 9023267e5643..bd77825fd5a1 100644
@@ -209,7 +209,7 @@ static void annotate_browser__draw_current_jump(struct ui_browser *browser)
 		ui_browser__mark_fused(browser,
 				       pcnt_width + 3 + notes->widths.addr + width,
 				       from - 1,
-				       to > from ? true : false);
+				       to > from);
 	}
 }
 
Signature · 1 line
2.21.1
#1 lore raw

Em Mon, Apr 20, 2020 at 08:35:28PM +0800, Jason Yan escreveu:

Quoted 5 lines

The '>' expression itself is bool, no need to convert it to bool again. This fixes the following coccicheck warning:

tools/perf/ui/browsers/annotate.c:212:30-35: WARNING: conversion to bool not needed here

Thanks, applied.

- Arnaldo