Skip to contentSkip to conversation

net: use sock_valbool_flag to set/clear SOCK_RXQ_OVFL

PATCH Applied Johannes Berg 3 participants 3 messages Oct 7, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: use sock_valbool_flag to set/clear SOCK_RXQ_OVFL

From: Johannes Berg <[email protected]>

There's no point in open-coding sock_valbool_flag().

---
 net/core/sock.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
net/core/sock.c +1 -4
@@ -738,10 +738,7 @@ set_rcvbuf:
 		/* We implement the SO_SNDLOWAT etc to
 		   not be settable (1003.1g 5.3) */
 	case SO_RXQ_OVFL:
-		if (valbool)
-			sock_set_flag(sk, SOCK_RXQ_OVFL);
-		else
-			sock_reset_flag(sk, SOCK_RXQ_OVFL);
+		sock_valbool_flag(sk, SOCK_RXQ_OVFL, valbool);
 		break;
 	default:
 		ret = -ENOPROTOOPT;
Acked-by on v1 1/1
#1 lore raw
Quoted 26 lines · Johannes Berg

From: Johannes Berg <[email protected]>

There's no point in open-coding sock_valbool_flag().

---
 net/core/sock.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
net/core/sock.c +1 -5
@@ -738,10 +738,7 @@ set_rcvbuf:
 		/* We implement the SO_SNDLOWAT etc to
 		   not be settable (1003.1g 5.3) */
 	case SO_RXQ_OVFL:
-		if (valbool)
-			sock_set_flag(sk, SOCK_RXQ_OVFL);
-		else
-			sock_reset_flag(sk, SOCK_RXQ_OVFL);
+		sock_valbool_flag(sk, SOCK_RXQ_OVFL, valbool);
 		break;
 	default:
 		ret = -ENOPROTOOPT;
 
 
--
Quoted 4 lines

To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Looks good, thanks Johannes!