summaryrefslogtreecommitdiff
path: root/hw/mipsnet.c
diff options
context:
space:
mode:
authorMark McLoughlin <markmc@redhat.com>2009-05-18 13:33:03 +0100
committerMark McLoughlin <markmc@redhat.com>2009-06-09 11:38:49 +0100
commite3f5ec2b5e92706e3b807059f79b1fb5d936e567 (patch)
treee49989391834350755b1138d07ac3e464a5dbd6c /hw/mipsnet.c
parentcda9046ba7dbba45f3016e5d60caffa2d72960fa (diff)
downloadqemu-e3f5ec2b5e92706e3b807059f79b1fb5d936e567.tar.gz
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/mipsnet.c')
-rw-r--r--hw/mipsnet.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/hw/mipsnet.c b/hw/mipsnet.c
index a22f49aabc..e9128cbb34 100644
--- a/hw/mipsnet.c
+++ b/hw/mipsnet.c
@@ -66,23 +66,23 @@ static int mipsnet_buffer_full(MIPSnetState *s)
return 0;
}
-static int mipsnet_can_receive(void *opaque)
+static int mipsnet_can_receive(VLANClientState *vc)
{
- MIPSnetState *s = opaque;
+ MIPSnetState *s = vc->opaque;
if (s->busy)
return 0;
return !mipsnet_buffer_full(s);
}
-static void mipsnet_receive(void *opaque, const uint8_t *buf, size_t size)
+static void mipsnet_receive(VLANClientState *vc, const uint8_t *buf, size_t size)
{
- MIPSnetState *s = opaque;
+ MIPSnetState *s = vc->opaque;
#ifdef DEBUG_MIPSNET_RECEIVE
printf("mipsnet: receiving len=%d\n", size);
#endif
- if (!mipsnet_can_receive(opaque))
+ if (!mipsnet_can_receive(vc))
return;
s->busy = 1;