patch-2.4.10 linux/net/core/iovec.c

Next file: linux/net/ipv4/arp.c
Previous file: linux/net/core/dev.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.9/linux/net/core/iovec.c linux/net/core/iovec.c
@@ -87,7 +87,7 @@
 	{
 		if(iov->iov_len)
 		{
-			int copy = min(unsigned int, iov->iov_len, len);
+			int copy = min_t(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(unsigned int, iov->iov_len, len);
+			int copy = min_t(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(unsigned int, len, iov->iov_len);
+			int copy = min_t(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(unsigned int, len, iov->iov_len - offset);
+		int copy = min_t(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;
-		int copy = min(unsigned int, len, iov->iov_len - offset);
+		int copy = min_t(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)