Skip to content

Commit

Permalink
bpf: Simplify bool comparison
Browse files Browse the repository at this point in the history
Fix the following coccicheck warning:

./tools/bpf/bpf_dbg.c:893:32-36: WARNING: Comparison to bool.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/1612777416-34339-1-git-send-email-jiapeng.chong@linux.alibaba.com
  • Loading branch information
Jiapeng Chong authored and Andrii Nakryiko committed Feb 9, 2021
1 parent 1589a1f commit 0a1b0fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/bpf/bpf_dbg.c
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,7 @@ static int bpf_run_stepping(struct sock_filter *f, uint16_t bpf_len,
bool stop = false;
int i = 1;

while (bpf_curr.Rs == false && stop == false) {
while (!bpf_curr.Rs && !stop) {
bpf_safe_regs();

if (i++ == next)
Expand Down

0 comments on commit 0a1b0fd

Please sign in to comment.