[ovs-dev] [PATCH 2/4] datapath: Fix warning on 64-bit builds.

Ben Pfaff blp at nicira.com
Mon Oct 12 18:14:28 UTC 2009


---
 datapath/datapath.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/datapath/datapath.c b/datapath/datapath.c
index 756d86b..abc5599 100644
--- a/datapath/datapath.c
+++ b/datapath/datapath.c
@@ -1561,7 +1561,7 @@ ssize_t openvswitch_read(struct file *f, char __user *buf, size_t nbytes,
 		}
 	}
 success:
-	copy_bytes = min(skb->len, nbytes);
+	copy_bytes = min_t(size_t, skb->len, nbytes);
 	iov.iov_base = buf;
 	iov.iov_len = copy_bytes;
 	retval = skb_copy_datagram_iovec(skb, 0, &iov, iov.iov_len);
-- 
1.6.3.3





More information about the dev mailing list