Commit 4689f4b3a54fb79423e444b5164afe27fbb8ab74
1 parent
b535b7b2
Use saner types for virtio-net
This was spotted by malc Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6075 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
2 additions
and
2 deletions
hw/virtio-net.c
@@ -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) | ||
106 | } | 106 | } |
107 | 107 | ||
108 | static int receive_header(VirtIONet *n, struct iovec *iov, int iovcnt, | 108 | static int receive_header(VirtIONet *n, struct iovec *iov, int iovcnt, |
109 | - const void *buf, int size, int hdr_len) | 109 | + const void *buf, size_t size, size_t hdr_len) |
110 | { | 110 | { |
111 | struct virtio_net_hdr *hdr = iov[0].iov_base; | 111 | struct virtio_net_hdr *hdr = iov[0].iov_base; |
112 | int offset = 0; | 112 | 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) | ||
127 | { | 127 | { |
128 | VirtIONet *n = opaque; | 128 | VirtIONet *n = opaque; |
129 | struct virtio_net_hdr_mrg_rxbuf *mhdr = NULL; | 129 | struct virtio_net_hdr_mrg_rxbuf *mhdr = NULL; |
130 | - int hdr_len, offset, i; | 130 | + size_t hdr_len, offset, i; |
131 | 131 | ||
132 | if (!do_virtio_net_can_receive(n, size)) | 132 | if (!do_virtio_net_can_receive(n, size)) |
133 | return; | 133 | return; |