Commit 8b80624e authored by Stephen Hemminger's avatar Stephen Hemminger

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

parent 4c0abe61
......@@ -113,11 +113,12 @@ static void econet_insert_socket(struct hlist_head *list, struct sock *sk)
*/
static int econet_recvmsg(struct kiocb *iocb, struct socket *sock,
struct msghdr *msg, int len, int flags)
struct msghdr *msg, size_t len, int flags)
{
struct sock *sk = sock->sk;
struct sk_buff *skb;
int copied, err;
size_t copied;
int err;
msg->msg_namelen = sizeof(struct sockaddr_ec);
......@@ -246,7 +247,7 @@ static void ec_tx_done(struct sk_buff *skb, int result)
*/
static int econet_sendmsg(struct kiocb *iocb, struct socket *sock,
struct msghdr *msg, int len)
struct msghdr *msg, size_t len)
{
struct sock *sk = sock->sk;
struct sockaddr_ec *saddr=(struct sockaddr_ec *)msg->msg_name;
......@@ -308,6 +309,9 @@ static int econet_sendmsg(struct kiocb *iocb, struct socket *sock,
return -ENETDOWN;
}
if (len + 15 > dev->mtu)
return -EMSGSIZE;
if (dev->type == ARPHRD_ECONET)
{
/* Real hardware Econet. We're not worthy etc. */
......
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