aboutsummaryrefslogtreecommitdiffstats
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
authorPaolo Abeni <pabeni@redhat.com>2019-04-08 04:15:59 -0400
committerDavid S. Miller <davem@davemloft.net>2019-04-08 12:51:54 -0400
commitfd69c399c7d6262086b6b820757c6aeaa71feeba (patch)
tree147961d1aab87e039665eda235344ba5d6900111 /net/unix/af_unix.c
parent1f17f7742eeba73dbd5ae8bdec1a85ce5877001e (diff)
datagram: remove rendundant 'peeked' argument
After commit a297569fe00a ("net/udp: do not touch skb->peeked unless really needed") the 'peeked' argument of __skb_try_recv_datagram() and friends is always equal to !!'flags & MSG_PEEK'. Since such argument is really a boolean info, and the callers have already 'flags & MSG_PEEK' handy, we can remove it and clean-up the code a bit. Signed-off-by: Paolo Abeni <pabeni@redhat.com> Acked-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/unix/af_unix.c')
-rw-r--r--net/unix/af_unix.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index ddb838a1b74c..e68d7454f2e3 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -2040,8 +2040,8 @@ static int unix_dgram_recvmsg(struct socket *sock, struct msghdr *msg,
2040 struct unix_sock *u = unix_sk(sk); 2040 struct unix_sock *u = unix_sk(sk);
2041 struct sk_buff *skb, *last; 2041 struct sk_buff *skb, *last;
2042 long timeo; 2042 long timeo;
2043 int skip;
2043 int err; 2044 int err;
2044 int peeked, skip;
2045 2045
2046 err = -EOPNOTSUPP; 2046 err = -EOPNOTSUPP;
2047 if (flags&MSG_OOB) 2047 if (flags&MSG_OOB)
@@ -2053,8 +2053,8 @@ static int unix_dgram_recvmsg(struct socket *sock, struct msghdr *msg,
2053 mutex_lock(&u->iolock); 2053 mutex_lock(&u->iolock);
2054 2054
2055 skip = sk_peek_offset(sk, flags); 2055 skip = sk_peek_offset(sk, flags);
2056 skb = __skb_try_recv_datagram(sk, flags, NULL, &peeked, &skip, 2056 skb = __skb_try_recv_datagram(sk, flags, NULL, &skip, &err,
2057 &err, &last); 2057 &last);
2058 if (skb) 2058 if (skb)
2059 break; 2059 break;
2060 2060