summaryrefslogtreecommitdiffstats
path: root/hw/core/qdev.c
diff options
context:
space:
mode:
authorPaolo Bonzini2018-12-06 13:10:34 +0100
committerPaolo Bonzini2019-01-11 15:46:55 +0100
commiteae3eb3e185028d6e862db747e3b7397600d6762 (patch)
tree359a23639a6db7a77407cf8f366564561b970738 /hw/core/qdev.c
parentqemu/queue.h: reimplement QTAILQ without pointer-to-pointers (diff)
downloadqemu-eae3eb3e185028d6e862db747e3b7397600d6762.tar.gz
qemu-eae3eb3e185028d6e862db747e3b7397600d6762.tar.xz
qemu-eae3eb3e185028d6e862db747e3b7397600d6762.zip
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 <pbonzini@redhat.com>
Diffstat (limited to 'hw/core/qdev.c')
-rw-r--r--hw/core/qdev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/core/qdev.c b/hw/core/qdev.c
index 3769a2bccb..58ad8a64fc 100644
--- a/hw/core/qdev.c
+++ b/hw/core/qdev.c
@@ -158,7 +158,7 @@ DeviceState *qdev_try_create(BusState *bus, const char *type)
return dev;
}
-static QTAILQ_HEAD(device_listeners, DeviceListener) device_listeners
+static QTAILQ_HEAD(, DeviceListener) device_listeners
= QTAILQ_HEAD_INITIALIZER(device_listeners);
enum ListenerDirection { Forward, Reverse };
@@ -177,7 +177,7 @@ enum ListenerDirection { Forward, Reverse };
break; \
case Reverse: \
QTAILQ_FOREACH_REVERSE(_listener, &device_listeners, \
- device_listeners, link) { \
+ link) { \
if (_listener->_callback) { \
_listener->_callback(_listener, ##_args); \
} \