Skip to contentSkip to conversation

[6075] Use saner types for virtio-net

Qemu-devel Anthony Liguori 1 participant 1 message Dec 17, 2008

lore
Share & tools
lore
#0 lore raw

Revision: 6075

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6075
Author:   aliguori
Date:     2008-12-17 19:45:40 +0000 (Wed, 17 Dec 2008)

Log Message:
-----------
Use saner types for virtio-net

This was spotted by malc

Modified Paths:
--------------
trunk/hw/virtio-net.c

Modified: trunk/hw/virtio-net.c
===================================================================

hw/virtio-net.c +2 -2
@@ -106,7 +106,7 @@
 }
 
 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;
     int offset = 0;
@@ -127,7 +127,7 @@
 {
     VirtIONet *n = opaque;
     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))
         return;