diff options
author | jing yangyang | 2021-08-19 20:35:27 -0700 |
---|---|---|
committer | David S. Miller | 2021-08-20 14:55:53 +0100 |
commit | fa16ee77364f03d8565e5adeff1b119b29acca69 (patch) | |
tree | 102569d09c28a62189959ad6ec3799924445af9f /tools | |
parent | c1125062fb4074fade7fa1114b9746a6620eb5bf (diff) |
tools/net: Use bitwise instead of arithmetic operator for flags
This silences the following coccinelle warning:
"WARNING: sum of probable bitmasks, consider |"
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: jing yangyang <jing.yangyang@zte.com.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/testing/selftests/net/psock_fanout.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/net/psock_fanout.c b/tools/testing/selftests/net/psock_fanout.c index db4521335722..3653d6468c67 100644 --- a/tools/testing/selftests/net/psock_fanout.c +++ b/tools/testing/selftests/net/psock_fanout.c @@ -111,8 +111,8 @@ static int sock_fanout_open(uint16_t typeflags, uint16_t group_id) static void sock_fanout_set_cbpf(int fd) { struct sock_filter bpf_filter[] = { - BPF_STMT(BPF_LD+BPF_B+BPF_ABS, 80), /* ldb [80] */ - BPF_STMT(BPF_RET+BPF_A, 0), /* ret A */ + BPF_STMT(BPF_LD | BPF_B | BPF_ABS, 80), /* ldb [80] */ + BPF_STMT(BPF_RET | BPF_A, 0), /* ret A */ }; struct sock_fprog bpf_prog; |