datapath: Fix warning on 64-bit builds.
authorBen Pfaff <blp@nicira.com>
Mon, 12 Oct 2009 17:34:38 +0000 (10:34 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 15 Oct 2009 17:24:36 +0000 (10:24 -0700)
datapath/datapath.c

index 756d86b726deb247d238460d9c8311c6bbdb8c17..abc559935b710a00fc4dbb0fda70ada639237a15 100644 (file)
@@ -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);