diff options
author | Mark McLoughlin <markmc@redhat.com> | 2009-05-18 13:33:03 +0100 |
---|---|---|
committer | Mark McLoughlin <markmc@redhat.com> | 2009-06-09 11:38:49 +0100 |
commit | e3f5ec2b5e92706e3b807059f79b1fb5d936e567 (patch) | |
tree | e49989391834350755b1138d07ac3e464a5dbd6c /hw/ne2000.c | |
parent | cda9046ba7dbba45f3016e5d60caffa2d72960fa (diff) |
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/ne2000.c')
-rw-r--r-- | hw/ne2000.c | 8 |
1 files changed, 4 insertions, 4 deletions
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]; |