From eae3eb3e185028d6e862db747e3b7397600d6762 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 6 Dec 2018 13:10:34 +0100 Subject: qemu/queue.h: simplify reverse access to QTAILQ The new definition of QTAILQ does not require passing the headname, remove it. Signed-off-by: Paolo Bonzini --- hw/usb/dev-mtp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hw/usb/dev-mtp.c') diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c index b19b576278..68c5eb8eaa 100644 --- a/hw/usb/dev-mtp.c +++ b/hw/usb/dev-mtp.c @@ -191,7 +191,7 @@ struct MTPState { #ifdef CONFIG_INOTIFY1 /* inotify descriptor */ int inotifyfd; - QTAILQ_HEAD(events, MTPMonEntry) events; + QTAILQ_HEAD(, MTPMonEntry) events; #endif /* Responder is expecting a write operation */ bool write_pending; @@ -1989,7 +1989,7 @@ static void usb_mtp_handle_data(USBDevice *dev, USBPacket *p) case EP_EVENT: #ifdef CONFIG_INOTIFY1 if (!QTAILQ_EMPTY(&s->events)) { - struct MTPMonEntry *e = QTAILQ_LAST(&s->events, events); + struct MTPMonEntry *e = QTAILQ_LAST(&s->events); uint32_t handle; int len = sizeof(container) + sizeof(uint32_t); -- cgit v1.2.3