OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1589a1f
)
bpf: Simplify bool comparison
author
Jiapeng Chong
<jiapeng.chong@linux.alibaba.com>
Mon, 8 Feb 2021 09:43:36 +0000
(17:43 +0800)
committer
Andrii Nakryiko
<andrii@kernel.org>
Tue, 9 Feb 2021 01:55:38 +0000
(17:55 -0800)
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
tools/bpf/bpf_dbg.c
patch
|
blob
|
history
diff --git
a/tools/bpf/bpf_dbg.c
b/tools/bpf/bpf_dbg.c
index
a0ebcdf
..
a07dfc4
100644
(file)
--- a/
tools/bpf/bpf_dbg.c
+++ b/
tools/bpf/bpf_dbg.c
@@
-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)