diff options
author | Mark McLoughlin | 2009-05-18 14:33:03 +0200 |
---|---|---|
committer | Mark McLoughlin | 2009-06-09 12:38:49 +0200 |
commit | e3f5ec2b5e92706e3b807059f79b1fb5d936e567 (patch) | |
tree | e49989391834350755b1138d07ac3e464a5dbd6c /hw/usb-net.c | |
parent | net: re-name vc->fd_read() to vc->receive() (diff) | |
download | qemu-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/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; |