Skip to contentSkip to conversation

Bluetooth: Remove unneeded parenthesis around MSG_OOB

PATCH Applied Marcel Holtmann 2 participants 2 messages Oct 25, 2015 – Oct 26, 2015

Subsystems (2)
lore
Share & tools
lore

Marcel Holtmann

author maintainer
#0 lore raw

PATCH 1/1 Bluetooth: Remove unneeded parenthesis around MSG_OOB

There are two checks that are still using (MSG_OOB) instead of just MSG_OOB and so lets just fix them.

---
 net/bluetooth/af_bluetooth.c | 2 +-
 net/bluetooth/hci_sock.c     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
net/bluetooth/af_bluetooth.c +1 -1
index c55717929213..a3bffd1ec2b4 100644
@@ -221,7 +221,7 @@ int bt_sock_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
 
 	BT_DBG("sock %p sk %p len %zu", sock, sk, len);
 
-	if (flags & (MSG_OOB))
+	if (flags & MSG_OOB)
 		return -EOPNOTSUPP;
 
 	skb = skb_recv_datagram(sk, flags, noblock, &err);
net/bluetooth/hci_sock.c +1 -1
index 77e816f91a61..b1eb8c09a660 100644
@@ -1001,7 +1001,7 @@ static int hci_sock_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
 
 	BT_DBG("sock %p, sk %p", sock, sk);
 
-	if (flags & (MSG_OOB))
+	if (flags & MSG_OOB)
 		return -EOPNOTSUPP;
 
 	if (sk->sk_state == BT_CLOSED)
Signature · 1 line
2.4.3
#1 lore raw

Hi Marcel,

Quoted 8 lines · Marcel Holtmann

There are two checks that are still using (MSG_OOB) instead of just MSG_OOB and so lets just fix them.

---
 net/bluetooth/af_bluetooth.c | 2 +-
 net/bluetooth/hci_sock.c     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Applied to bluetooth-next. Thanks.

Johan