* [PATCH] (16/17) af_unix -- size_t for send/recvmsg
@ 2004-01-09 22:01 Stephen Hemminger
0 siblings, 0 replies; only message in thread
From: Stephen Hemminger @ 2004-01-09 22:01 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev
Convert Unix domain to handle unsigned for length in send/recv msg.
diff -Nru a/net/unix/af_unix.c b/net/unix/af_unix.c
--- a/net/unix/af_unix.c Mon Dec 8 16:20:16 2003
+++ b/net/unix/af_unix.c Mon Dec 8 16:20:16 2003
@@ -1176,7 +1176,7 @@
*/
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 *sk = sock->sk;
@@ -1217,7 +1217,7 @@
goto out;
err = -EMSGSIZE;
- if ((unsigned)len > sk->sk_sndbuf - 32)
+ if (len > sk->sk_sndbuf - 32)
goto out;
skb = sock_alloc_send_skb(sk, len, msg->msg_flags&MSG_DONTWAIT, &err);
@@ -1324,7 +1324,7 @@
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 *sk = sock->sk;
@@ -1447,7 +1447,7 @@
}
static int unix_dgram_recvmsg(struct kiocb *iocb, struct socket *sock,
- struct msghdr *msg, int size,
+ struct msghdr *msg, size_t size,
int flags)
{
struct sock_iocb *siocb = kiocb_to_siocb(iocb);
@@ -1555,7 +1555,7 @@
static int unix_stream_recvmsg(struct kiocb *iocb, struct socket *sock,
- struct msghdr *msg, int size,
+ struct msghdr *msg, size_t size,
int flags)
{
struct sock_iocb *siocb = kiocb_to_siocb(iocb);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-01-09 22:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-09 22:01 [PATCH] (16/17) af_unix -- size_t for send/recvmsg Stephen Hemminger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).