提交 4689f4b3 编写于 作者: A aliguori

Use saner types for virtio-net

This was spotted by malc
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6075 c046a42c-6fe2-441c-8c8c-71466251a162
上级 b535b7b2
...@@ -106,7 +106,7 @@ static int iov_fill(struct iovec *iov, int iovcnt, const void *buf, int count) ...@@ -106,7 +106,7 @@ static int iov_fill(struct iovec *iov, int iovcnt, const void *buf, int count)
} }
static int receive_header(VirtIONet *n, struct iovec *iov, int iovcnt, static int receive_header(VirtIONet *n, struct iovec *iov, int iovcnt,
const void *buf, int size, int hdr_len) const void *buf, size_t size, size_t hdr_len)
{ {
struct virtio_net_hdr *hdr = iov[0].iov_base; struct virtio_net_hdr *hdr = iov[0].iov_base;
int offset = 0; int offset = 0;
...@@ -127,7 +127,7 @@ static void virtio_net_receive(void *opaque, const uint8_t *buf, int size) ...@@ -127,7 +127,7 @@ static void virtio_net_receive(void *opaque, const uint8_t *buf, int size)
{ {
VirtIONet *n = opaque; VirtIONet *n = opaque;
struct virtio_net_hdr_mrg_rxbuf *mhdr = NULL; struct virtio_net_hdr_mrg_rxbuf *mhdr = NULL;
int hdr_len, offset, i; size_t hdr_len, offset, i;
if (!do_virtio_net_can_receive(n, size)) if (!do_virtio_net_can_receive(n, size))
return; return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册