Skip to content

Commit

Permalink
net: use sock_valbool_flag to set/clear SOCK_RXQ_OVFL
Browse files Browse the repository at this point in the history
There's no point in open-coding sock_valbool_flag().

Signed-off-by: Johannes Berg <[email protected]>
Acked-by: Neil Horman <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
jmberg-intel authored and davem330 committed Oct 7, 2011
1 parent d5b1d8c commit 8083f0f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions net/core/sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -738,10 +738,7 @@ int sock_setsockopt(struct socket *sock, int level, int optname,
/* 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;
Expand Down

0 comments on commit 8083f0f

Please sign in to comment.