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/ne2000.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'hw/ne2000.c') diff --git a/hw/ne2000.c b/hw/ne2000.c index 502c8ae664..c0fc34c4b2 100644 --- a/hw/ne2000.c +++ b/hw/ne2000.c @@ -213,9 +213,9 @@ static int ne2000_buffer_full(NE2000State *s) return 0; } -static int ne2000_can_receive(void *opaque) +static int ne2000_can_receive(VLANClientState *vc) { - NE2000State *s = opaque; + NE2000State *s = vc->opaque; if (s->cmd & E8390_STOP) return 1; @@ -224,9 +224,9 @@ static int ne2000_can_receive(void *opaque) #define MIN_BUF_SIZE 60 -static void ne2000_receive(void *opaque, const uint8_t *buf, size_t size) +static void ne2000_receive(VLANClientState *vc, const uint8_t *buf, size_t size) { - NE2000State *s = opaque; + NE2000State *s = vc->opaque; uint8_t *p; unsigned int total_len, next, avail, len, index, mcast_idx; uint8_t buf1[60]; -- cgit 1.4.1