Skip to content

Commit fa16ee7

Browse files
jing yangyangdavem330
authored andcommitted
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 <[email protected]> Signed-off-by: jing yangyang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent c112506 commit fa16ee7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/testing/selftests/net/psock_fanout.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ static int sock_fanout_open(uint16_t typeflags, uint16_t group_id)
111111
static void sock_fanout_set_cbpf(int fd)
112112
{
113113
struct sock_filter bpf_filter[] = {
114-
BPF_STMT(BPF_LD+BPF_B+BPF_ABS, 80), /* ldb [80] */
115-
BPF_STMT(BPF_RET+BPF_A, 0), /* ret A */
114+
BPF_STMT(BPF_LD | BPF_B | BPF_ABS, 80), /* ldb [80] */
115+
BPF_STMT(BPF_RET | BPF_A, 0), /* ret A */
116116
};
117117
struct sock_fprog bpf_prog;
118118

0 commit comments

Comments
 (0)