Skip to content

Commit 0a1b0fd

Browse files
Jiapeng Chonganakryiko
authored andcommitted
bpf: Simplify bool comparison
Fix the following coccicheck warning: ./tools/bpf/bpf_dbg.c:893:32-36: WARNING: Comparison to bool. Reported-by: Abaci Robot <[email protected]> Signed-off-by: Jiapeng Chong <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Link: https://lore.kernel.org/bpf/1612777416-34339-1-git-send-email-jiapeng.chong@linux.alibaba.com
1 parent 1589a1f commit 0a1b0fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/bpf/bpf_dbg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -890,7 +890,7 @@ static int bpf_run_stepping(struct sock_filter *f, uint16_t bpf_len,
890890
bool stop = false;
891891
int i = 1;
892892

893-
while (bpf_curr.Rs == false && stop == false) {
893+
while (!bpf_curr.Rs && !stop) {
894894
bpf_safe_regs();
895895

896896
if (i++ == next)

0 commit comments

Comments
 (0)