From: Ben Pfaff Date: Mon, 12 Oct 2009 17:34:38 +0000 (-0700) Subject: datapath: Fix warning on 64-bit builds. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b378b99f638212216f2090cb7be7efab3d90c14;p=openvswitch datapath: Fix warning on 64-bit builds. --- diff --git a/datapath/datapath.c b/datapath/datapath.c index 756d86b7..abc55993 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);