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/usb-net.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/usb-net.c')
-rw-r--r-- | hw/usb-net.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/usb-net.c b/hw/usb-net.c index 693e9767d2..d8d5e773f5 100644 --- a/hw/usb-net.c +++ b/hw/usb-net.c @@ -1369,9 +1369,9 @@ static int usb_net_handle_data(USBDevice *dev, USBPacket *p) return ret; } -static void usbnet_receive(void *opaque, const uint8_t *buf, size_t size) +static void usbnet_receive(VLANClientState *vc, const uint8_t *buf, size_t size) { - USBNetState *s = opaque; + USBNetState *s = vc->opaque; struct rndis_packet_msg_type *msg; if (s->rndis) { @@ -1405,9 +1405,9 @@ static void usbnet_receive(void *opaque, const uint8_t *buf, size_t size) s->in_ptr = 0; } -static int usbnet_can_receive(void *opaque) +static int usbnet_can_receive(VLANClientState *vc) { - USBNetState *s = opaque; + USBNetState *s = vc->opaque; if (s->rndis && !s->rndis_state == RNDIS_DATA_INITIALIZED) return 1; |