patch-2.4.9 linux/net/core/iovec.c
Next file: linux/net/ipv4/ip_output.c
Previous file: linux/net/bridge/br_input.c
Back to the patch index
Back to the overall index
- Lines: 45
- Date:
Wed Aug 15 01:22:17 2001
- Orig file:
v2.4.8/linux/net/core/iovec.c
- Orig date:
Thu Apr 12 12:11:39 2001
diff -u --recursive --new-file v2.4.8/linux/net/core/iovec.c linux/net/core/iovec.c
@@ -87,7 +87,7 @@
{
if(iov->iov_len)
{
- int copy = min(iov->iov_len, len);
+ int copy = min(unsigned int, iov->iov_len, len);
if (copy_to_user(iov->iov_base, kdata, copy))
goto out;
kdata+=copy;
@@ -114,7 +114,7 @@
{
if(iov->iov_len)
{
- int copy = min(iov->iov_len, len);
+ int copy = min(unsigned int, iov->iov_len, len);
memcpy(iov->iov_base, kdata, copy);
kdata+=copy;
len-=copy;
@@ -140,7 +140,7 @@
{
if(iov->iov_len)
{
- int copy = min(len, iov->iov_len);
+ int copy = min(unsigned int, len, iov->iov_len);
if (copy_from_user(kdata, iov->iov_base, copy))
goto out;
len-=copy;
@@ -175,7 +175,7 @@
while (len > 0)
{
u8 *base = iov->iov_base + offset;
- int copy = min(len, iov->iov_len - offset);
+ int copy = min(unsigned int, len, iov->iov_len - offset);
offset = 0;
if (copy_from_user(kdata, base, copy))
@@ -214,7 +214,7 @@
while (len > 0)
{
u8 *base = iov->iov_base + offset;
- unsigned int copy = min(len, iov->iov_len - offset);
+ int copy = min(unsigned int, len, iov->iov_len - offset);
offset = 0;
/* There is a remnant from previous iov. */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)