From e3f5ec2b5e92706e3b807059f79b1fb5d936e567 Mon Sep 17 00:00:00 2001 From: Mark McLoughlin Date: Mon, 18 May 2009 13:33:03 +0100 Subject: net: pass VLANClientState* as first arg to receive handlers Give static type checking a chance to catch errors. Signed-off-by: Mark McLoughlin --- hw/xen_nic.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'hw/xen_nic.c') diff --git a/hw/xen_nic.c b/hw/xen_nic.c index 0643e57877..173e87a8ff 100644 --- a/hw/xen_nic.c +++ b/hw/xen_nic.c @@ -223,9 +223,9 @@ static void net_rx_response(struct XenNetDev *netdev, #define NET_IP_ALIGN 2 -static int net_rx_ok(void *opaque) +static int net_rx_ok(VLANClientState *vc) { - struct XenNetDev *netdev = opaque; + struct XenNetDev *netdev = vc->opaque; RING_IDX rc, rp; if (netdev->xendev.be_state != XenbusStateConnected) @@ -243,9 +243,9 @@ static int net_rx_ok(void *opaque) return 1; } -static void net_rx_packet(void *opaque, const uint8_t *buf, size_t size) +static void net_rx_packet(VLANClientState *vc, const uint8_t *buf, size_t size) { - struct XenNetDev *netdev = opaque; + struct XenNetDev *netdev = vc->opaque; netif_rx_request_t rxreq; RING_IDX rc, rp; void *page; -- cgit v1.2.3