aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio-net.c
diff options
context:
space:
mode:
authorMark McLoughlin <markmc@redhat.com>2009-05-18 13:33:03 +0100
committerMark McLoughlin <markmc@redhat.com>2009-06-09 11:38:49 +0100
commite3f5ec2b5e92706e3b807059f79b1fb5d936e567 (patch)
treee49989391834350755b1138d07ac3e464a5dbd6c /hw/virtio-net.c
parentcda9046ba7dbba45f3016e5d60caffa2d72960fa (diff)
downloadqemu-e3f5ec2b5e92706e3b807059f79b1fb5d936e567.zip
qemu-e3f5ec2b5e92706e3b807059f79b1fb5d936e567.tar.gz
qemu-e3f5ec2b5e92706e3b807059f79b1fb5d936e567.tar.bz2
net: pass VLANClientState* as first arg to receive handlers
Give static type checking a chance to catch errors. Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Diffstat (limited to 'hw/virtio-net.c')
-rw-r--r--hw/virtio-net.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/virtio-net.c b/hw/virtio-net.c
index 3ca93f5..1ffebac 100644
--- a/hw/virtio-net.c
+++ b/hw/virtio-net.c
@@ -288,9 +288,9 @@ static int do_virtio_net_can_receive(VirtIONet *n, int bufsize)
return 1;
}
-static int virtio_net_can_receive(void *opaque)
+static int virtio_net_can_receive(VLANClientState *vc)
{
- VirtIONet *n = opaque;
+ VirtIONet *n = vc->opaque;
return do_virtio_net_can_receive(n, VIRTIO_NET_MAX_BUFSIZE);
}
@@ -361,9 +361,9 @@ static int receive_filter(VirtIONet *n, const uint8_t *buf, int size)
return 0;
}
-static void virtio_net_receive(void *opaque, const uint8_t *buf, size_t size)
+static void virtio_net_receive(VLANClientState *vc, const uint8_t *buf, size_t size)
{
- VirtIONet *n = opaque;
+ VirtIONet *n = vc->opaque;
struct virtio_net_hdr_mrg_rxbuf *mhdr = NULL;
size_t hdr_len, offset, i;