From: Stephen Hemminger <shemminger@osdl.org>
To: "David S. Miller" <davem@redhat.com>,
Jean Tourrilhes <jt@bougret.hpl.hp.com>
Cc: netdev@oss.sgi.com
Subject: [PATCH] (12/17) irda -- size_t for send/recvmsg
Date: Fri, 9 Jan 2004 14:03:17 -0800 [thread overview]
Message-ID: <20040109140317.0a8a30a8@linux.local> (raw)
Convert IRDA to unsigned length for send/recv msg.
diff -Nru a/net/irda/af_irda.c b/net/irda/af_irda.c
--- a/net/irda/af_irda.c Mon Dec 8 16:20:04 2003
+++ b/net/irda/af_irda.c Mon Dec 8 16:20:04 2003
@@ -1257,7 +1257,7 @@
* fragment the message if necessary
*/
static int irda_sendmsg(struct kiocb *iocb, struct socket *sock,
- struct msghdr *msg, int len)
+ struct msghdr *msg, size_t len)
{
struct sock *sk = sock->sk;
struct irda_sock *self;
@@ -1329,12 +1329,13 @@
* after being read, regardless of how much the user actually read
*/
static int irda_recvmsg_dgram(struct kiocb *iocb, struct socket *sock,
- struct msghdr *msg, int size, int flags)
+ struct msghdr *msg, size_t size, int flags)
{
struct sock *sk = sock->sk;
struct irda_sock *self = irda_sk(sk);
struct sk_buff *skb;
- int copied, err;
+ size_t copied;
+ int err;
IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
@@ -1379,12 +1380,12 @@
* Function irda_recvmsg_stream (iocb, sock, msg, size, flags)
*/
static int irda_recvmsg_stream(struct kiocb *iocb, struct socket *sock,
- struct msghdr *msg, int size, int flags)
+ struct msghdr *msg, size_t size, int flags)
{
struct sock *sk = sock->sk;
struct irda_sock *self = irda_sk(sk);
int noblock = flags & MSG_DONTWAIT;
- int copied = 0;
+ size_t copied = 0;
int target = 1;
DECLARE_WAITQUEUE(waitq, current);
@@ -1505,7 +1506,7 @@
*
*/
static int irda_sendmsg_dgram(struct kiocb *iocb, struct socket *sock,
- struct msghdr *msg, int len)
+ struct msghdr *msg, size_t len)
{
struct sock *sk = sock->sk;
struct irda_sock *self;
@@ -1571,7 +1572,7 @@
*/
#ifdef CONFIG_IRDA_ULTRA
static int irda_sendmsg_ultra(struct kiocb *iocb, struct socket *sock,
- struct msghdr *msg, int len)
+ struct msghdr *msg, size_t len)
{
struct sock *sk = sock->sk;
struct irda_sock *self;
next reply other threads:[~2004-01-09 22:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-09 22:03 Stephen Hemminger [this message]
2004-01-08 22:56 ` [PATCH] (12/17) irda -- size_t for send/recvmsg Jean Tourrilhes
2004-01-08 23:36 ` David S. Miller
2004-01-08 23:47 ` Jean Tourrilhes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040109140317.0a8a30a8@linux.local \
--to=shemminger@osdl.org \
--cc=davem@redhat.com \
--cc=jt@bougret.hpl.hp.com \
--cc=netdev@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).