All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wright <chris@wirex.com>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] 2.4.11 min() in tcp.c
Date: Wed, 10 Oct 2001 16:44:30 -0700	[thread overview]
Message-ID: <20011010164430.B19995@figure1.int.wirex.com> (raw)

compiling 2.4.11 gives the following warning.

tcp.c:855: warning: comparison of distinct pointer types lacks a cast

the following patch, changes min() to min_t() to make size_t explicit.

thanks,
-chris

--- linux-2.4.11/net/ipv4/tcp.c	Mon Oct  1 09:19:57 2001
+++ linux-2.4.11-min/net/ipv4/tcp.c	Wed Oct 10 16:42:55 2001
@@ -852,7 +852,7 @@
 
 		page = pages[poffset/PAGE_SIZE];
 		offset = poffset % PAGE_SIZE;
-		size = min(psize, PAGE_SIZE-offset);
+		size = min_t (size_t, psize, PAGE_SIZE-offset);
 
 		if (tp->send_head==NULL || (copy = mss_now - skb->len) <= 0) {
 new_segment:

             reply	other threads:[~2001-10-10 23:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-10 23:44 Chris Wright [this message]
2001-10-10 23:56 ` [PATCH] 2.4.11 min() in tcp.c David S. Miller
2001-10-11  0:00   ` Chris Wright

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=20011010164430.B19995@figure1.int.wirex.com \
    --to=chris@wirex.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.