Commit c2852cc4 authored by Stephen Hemminger's avatar Stephen Hemminger

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

parent 7153ce0e
...@@ -910,7 +910,7 @@ int x25_rx_call_request(struct sk_buff *skb, struct x25_neigh *nb, ...@@ -910,7 +910,7 @@ int x25_rx_call_request(struct sk_buff *skb, struct x25_neigh *nb,
} }
static int x25_sendmsg(struct kiocb *iocb, struct socket *sock, static int x25_sendmsg(struct kiocb *iocb, struct socket *sock,
struct msghdr *msg, int len) struct msghdr *msg, size_t len)
{ {
struct sock *sk = sock->sk; struct sock *sk = sock->sk;
struct x25_opt *x25 = x25_sk(sk); struct x25_opt *x25 = x25_sk(sk);
...@@ -919,7 +919,8 @@ static int x25_sendmsg(struct kiocb *iocb, struct socket *sock, ...@@ -919,7 +919,8 @@ static int x25_sendmsg(struct kiocb *iocb, struct socket *sock,
struct sk_buff *skb; struct sk_buff *skb;
unsigned char *asmptr; unsigned char *asmptr;
int noblock = msg->msg_flags & MSG_DONTWAIT; int noblock = msg->msg_flags & MSG_DONTWAIT;
int size, qbit = 0, rc = -EINVAL; size_t size;
int qbit = 0, rc = -EINVAL;
if (msg->msg_flags & ~(MSG_DONTWAIT | MSG_OOB | MSG_EOR)) if (msg->msg_flags & ~(MSG_DONTWAIT | MSG_OOB | MSG_EOR))
goto out; goto out;
...@@ -1085,13 +1086,14 @@ static int x25_sendmsg(struct kiocb *iocb, struct socket *sock, ...@@ -1085,13 +1086,14 @@ static int x25_sendmsg(struct kiocb *iocb, struct socket *sock,
static int x25_recvmsg(struct kiocb *iocb, struct socket *sock, static int x25_recvmsg(struct kiocb *iocb, struct socket *sock,
struct msghdr *msg, int size, struct msghdr *msg, size_t size,
int flags) int flags)
{ {
struct sock *sk = sock->sk; struct sock *sk = sock->sk;
struct x25_opt *x25 = x25_sk(sk); struct x25_opt *x25 = x25_sk(sk);
struct sockaddr_x25 *sx25 = (struct sockaddr_x25 *)msg->msg_name; struct sockaddr_x25 *sx25 = (struct sockaddr_x25 *)msg->msg_name;
int copied, qbit; size_t copied;
int qbit;
struct sk_buff *skb; struct sk_buff *skb;
unsigned char *asmptr; unsigned char *asmptr;
int rc = -ENOTCONN; int rc = -ENOTCONN;
......
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