summaryrefslogtreecommitdiffstats
path: root/hw/ne2000.c
diff options
context:
space:
mode:
authorMark McLoughlin2009-05-18 14:33:03 +0200
committerMark McLoughlin2009-06-09 12:38:49 +0200
commite3f5ec2b5e92706e3b807059f79b1fb5d936e567 (patch)
treee49989391834350755b1138d07ac3e464a5dbd6c /hw/ne2000.c
parentnet: re-name vc->fd_read() to vc->receive() (diff)
downloadqemu-e3f5ec2b5e92706e3b807059f79b1fb5d936e567.tar.gz
qemu-e3f5ec2b5e92706e3b807059f79b1fb5d936e567.tar.xz
qemu-e3f5ec2b5e92706e3b807059f79b1fb5d936e567.zip
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.c8
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];