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/mcf_fec.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'hw/mcf_fec.c') diff --git a/hw/mcf_fec.c b/hw/mcf_fec.c index 0b0f17ade6..d2534d05fb 100644 --- a/hw/mcf_fec.c +++ b/hw/mcf_fec.c @@ -347,15 +347,15 @@ static void mcf_fec_write(void *opaque, target_phys_addr_t addr, uint32_t value) mcf_fec_update(s); } -static int mcf_fec_can_receive(void *opaque) +static int mcf_fec_can_receive(VLANClientState *vc) { - mcf_fec_state *s = (mcf_fec_state *)opaque; + mcf_fec_state *s = vc->opaque; return s->rx_enabled; } -static void mcf_fec_receive(void *opaque, const uint8_t *buf, size_t size) +static void mcf_fec_receive(VLANClientState *vc, const uint8_t *buf, size_t size) { - mcf_fec_state *s = (mcf_fec_state *)opaque; + mcf_fec_state *s = vc->opaque; mcf_fec_bd bd; uint32_t flags = 0; uint32_t addr; -- cgit v1.2.3