Commit 7153ce0e authored by Stephen Hemminger's avatar Stephen Hemminger

[UNIX]: Use size_t for size in {send,recv}msg.

parent 2bc9c2cc
...@@ -1176,7 +1176,7 @@ static void unix_attach_fds(struct scm_cookie *scm, struct sk_buff *skb) ...@@ -1176,7 +1176,7 @@ static void unix_attach_fds(struct scm_cookie *scm, struct sk_buff *skb)
*/ */
static int unix_dgram_sendmsg(struct kiocb *kiocb, struct socket *sock, static int unix_dgram_sendmsg(struct kiocb *kiocb, struct socket *sock,
struct msghdr *msg, int len) struct msghdr *msg, size_t len)
{ {
struct sock_iocb *siocb = kiocb_to_siocb(kiocb); struct sock_iocb *siocb = kiocb_to_siocb(kiocb);
struct sock *sk = sock->sk; struct sock *sk = sock->sk;
...@@ -1217,7 +1217,7 @@ static int unix_dgram_sendmsg(struct kiocb *kiocb, struct socket *sock, ...@@ -1217,7 +1217,7 @@ static int unix_dgram_sendmsg(struct kiocb *kiocb, struct socket *sock,
goto out; goto out;
err = -EMSGSIZE; err = -EMSGSIZE;
if ((unsigned)len > sk->sk_sndbuf - 32) if (len > sk->sk_sndbuf - 32)
goto out; goto out;
skb = sock_alloc_send_skb(sk, len, msg->msg_flags&MSG_DONTWAIT, &err); skb = sock_alloc_send_skb(sk, len, msg->msg_flags&MSG_DONTWAIT, &err);
...@@ -1324,7 +1324,7 @@ static int unix_dgram_sendmsg(struct kiocb *kiocb, struct socket *sock, ...@@ -1324,7 +1324,7 @@ static int unix_dgram_sendmsg(struct kiocb *kiocb, struct socket *sock,
static int unix_stream_sendmsg(struct kiocb *kiocb, struct socket *sock, static int unix_stream_sendmsg(struct kiocb *kiocb, struct socket *sock,
struct msghdr *msg, int len) struct msghdr *msg, size_t len)
{ {
struct sock_iocb *siocb = kiocb_to_siocb(kiocb); struct sock_iocb *siocb = kiocb_to_siocb(kiocb);
struct sock *sk = sock->sk; struct sock *sk = sock->sk;
...@@ -1447,7 +1447,7 @@ static void unix_copy_addr(struct msghdr *msg, struct sock *sk) ...@@ -1447,7 +1447,7 @@ static void unix_copy_addr(struct msghdr *msg, struct sock *sk)
} }
static int unix_dgram_recvmsg(struct kiocb *iocb, struct socket *sock, static int unix_dgram_recvmsg(struct kiocb *iocb, struct socket *sock,
struct msghdr *msg, int size, struct msghdr *msg, size_t size,
int flags) int flags)
{ {
struct sock_iocb *siocb = kiocb_to_siocb(iocb); struct sock_iocb *siocb = kiocb_to_siocb(iocb);
...@@ -1555,7 +1555,7 @@ static long unix_stream_data_wait(struct sock * sk, long timeo) ...@@ -1555,7 +1555,7 @@ static long unix_stream_data_wait(struct sock * sk, long timeo)
static int unix_stream_recvmsg(struct kiocb *iocb, struct socket *sock, static int unix_stream_recvmsg(struct kiocb *iocb, struct socket *sock,
struct msghdr *msg, int size, struct msghdr *msg, size_t size,
int flags) int flags)
{ {
struct sock_iocb *siocb = kiocb_to_siocb(iocb); struct sock_iocb *siocb = kiocb_to_siocb(iocb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment