netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: use sock_valbool_flag to set/clear SOCK_RXQ_OVFL
@ 2011-10-07 13:30 Johannes Berg
  2011-10-07 13:40 ` Neil Horman
  0 siblings, 1 reply; 3+ messages in thread
From: Johannes Berg @ 2011-10-07 13:30 UTC (permalink / raw)
  To: netdev

From: Johannes Berg <johannes.berg@intel.com>

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

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 net/core/sock.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--- a/net/core/sock.c	2011-10-07 15:26:30.000000000 +0200
+++ b/net/core/sock.c	2011-10-07 15:27:46.000000000 +0200
@@ -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;

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-10-07 17:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-07 13:30 [PATCH] net: use sock_valbool_flag to set/clear SOCK_RXQ_OVFL Johannes Berg
2011-10-07 13:40 ` Neil Horman
2011-10-07 17:27   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).