net: use sock_valbool_flag to set/clear SOCK_RXQ_OVFL
authorJohannes Berg <johannes.berg@intel.com>
Fri, 7 Oct 2011 03:30:20 +0000 (03:30 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 7 Oct 2011 17:27:07 +0000 (13:27 -0400)
There's no point in open-coding sock_valbool_flag().

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/sock.c

index b29ab61b029cf7f76fda992ecfcb8dcaa06b0483..83c462d3f451e0b674240f49fb1845680ab1a7b0 100644 (file)
@@ -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;