mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
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>
This commit is contained in:
parent
7274f01bb8
commit
eae3eb3e18
27 changed files with 49 additions and 54 deletions
|
@ -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); \
|
||||
} \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue