Browse Source

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>
tags/v4.0.0-rc0
Paolo Bonzini 6 months ago
parent
commit
eae3eb3e18

+ 1
- 1
cpus-common.c View File

@@ -99,7 +99,7 @@ void cpu_list_remove(CPUState *cpu)
99 99
         return;
100 100
     }
101 101
 
102
-    assert(!(cpu_index_auto_assigned && cpu != QTAILQ_LAST(&cpus, CPUTailQ)));
102
+    assert(!(cpu_index_auto_assigned && cpu != QTAILQ_LAST(&cpus)));
103 103
 
104 104
     QTAILQ_REMOVE_RCU(&cpus, cpu, node);
105 105
     cpu->cpu_index = UNASSIGNED_CPU_INDEX;

+ 1
- 1
dump.c View File

@@ -1557,7 +1557,7 @@ static void get_max_mapnr(DumpState *s)
1557 1557
 {
1558 1558
     GuestPhysBlock *last_block;
1559 1559
 
1560
-    last_block = QTAILQ_LAST(&s->guest_phys_blocks.head, GuestPhysBlockHead);
1560
+    last_block = QTAILQ_LAST(&s->guest_phys_blocks.head);
1561 1561
     s->max_mapnr = dump_paddr_to_pfn(s, last_block->target_end);
1562 1562
 }
1563 1563
 

+ 2
- 2
hw/core/qdev.c View File

@@ -158,7 +158,7 @@ DeviceState *qdev_try_create(BusState *bus, const char *type)
158 158
     return dev;
159 159
 }
160 160
 
161
-static QTAILQ_HEAD(device_listeners, DeviceListener) device_listeners
161
+static QTAILQ_HEAD(, DeviceListener) device_listeners
162 162
     = QTAILQ_HEAD_INITIALIZER(device_listeners);
163 163
 
164 164
 enum ListenerDirection { Forward, Reverse };
@@ -177,7 +177,7 @@ enum ListenerDirection { Forward, Reverse };
177 177
             break;                                                \
178 178
         case Reverse:                                             \
179 179
             QTAILQ_FOREACH_REVERSE(_listener, &device_listeners,  \
180
-                                   device_listeners, link) {      \
180
+                                   link) {                        \
181 181
                 if (_listener->_callback) {                       \
182 182
                     _listener->_callback(_listener, ##_args);     \
183 183
                 }                                                 \

+ 1
- 1
hw/scsi/scsi-bus.c View File

@@ -1554,7 +1554,7 @@ SCSIDevice *scsi_device_find(SCSIBus *bus, int channel, int id, int lun)
1554 1554
     BusChild *kid;
1555 1555
     SCSIDevice *target_dev = NULL;
1556 1556
 
1557
-    QTAILQ_FOREACH_REVERSE(kid, &bus->qbus.children, ChildrenHead, sibling) {
1557
+    QTAILQ_FOREACH_REVERSE(kid, &bus->qbus.children, sibling) {
1558 1558
         DeviceState *qdev = kid->child;
1559 1559
         SCSIDevice *dev = SCSI_DEVICE(qdev);
1560 1560
 

+ 1
- 1
hw/usb/combined-packet.c View File

@@ -64,7 +64,7 @@ void usb_combined_input_packet_complete(USBDevice *dev, USBPacket *p)
64 64
 
65 65
     status = combined->first->status;
66 66
     actual_length = combined->first->actual_length;
67
-    short_not_ok = QTAILQ_LAST(&combined->packets, packets_head)->short_not_ok;
67
+    short_not_ok = QTAILQ_LAST(&combined->packets)->short_not_ok;
68 68
 
69 69
     QTAILQ_FOREACH_SAFE(p, &combined->packets, combined_entry, next) {
70 70
         if (!done) {

+ 2
- 2
hw/usb/dev-mtp.c View File

@@ -191,7 +191,7 @@ struct MTPState {
191 191
 #ifdef CONFIG_INOTIFY1
192 192
     /* inotify descriptor */
193 193
     int          inotifyfd;
194
-    QTAILQ_HEAD(events, MTPMonEntry) events;
194
+    QTAILQ_HEAD(, MTPMonEntry) events;
195 195
 #endif
196 196
     /* Responder is expecting a write operation */
197 197
     bool write_pending;
@@ -1989,7 +1989,7 @@ static void usb_mtp_handle_data(USBDevice *dev, USBPacket *p)
1989 1989
     case EP_EVENT:
1990 1990
 #ifdef CONFIG_INOTIFY1
1991 1991
         if (!QTAILQ_EMPTY(&s->events)) {
1992
-            struct MTPMonEntry *e = QTAILQ_LAST(&s->events, events);
1992
+            struct MTPMonEntry *e = QTAILQ_LAST(&s->events);
1993 1993
             uint32_t handle;
1994 1994
             int len = sizeof(container) + sizeof(uint32_t);
1995 1995
 

+ 1
- 1
hw/usb/hcd-ehci.c View File

@@ -1823,7 +1823,7 @@ static int ehci_state_fetchqtd(EHCIQueue *q)
1823 1823
             break;
1824 1824
         case EHCI_ASYNC_INFLIGHT:
1825 1825
             /* Check if the guest has added new tds to the queue */
1826
-            again = ehci_fill_queue(QTAILQ_LAST(&q->packets, pkts_head));
1826
+            again = ehci_fill_queue(QTAILQ_LAST(&q->packets));
1827 1827
             /* Unfinished async handled packet, go horizontal */
1828 1828
             ehci_set_state(q->ehci, q->async, EST_HORIZONTALQH);
1829 1829
             break;

+ 1
- 1
hw/usb/hcd-ehci.h View File

@@ -247,7 +247,7 @@ struct EHCIQueue {
247 247
     uint32_t qtdaddr;      /* address QTD read from                */
248 248
     int last_pid;          /* pid of last packet executed          */
249 249
     USBDevice *dev;
250
-    QTAILQ_HEAD(pkts_head, EHCIPacket) packets;
250
+    QTAILQ_HEAD(, EHCIPacket) packets;
251 251
 };
252 252
 
253 253
 typedef QTAILQ_HEAD(EHCIQueueHead, EHCIQueue) EHCIQueueHead;

+ 2
- 2
hw/usb/hcd-uhci.c View File

@@ -99,7 +99,7 @@ struct UHCIQueue {
99 99
     UHCIState *uhci;
100 100
     USBEndpoint *ep;
101 101
     QTAILQ_ENTRY(UHCIQueue) next;
102
-    QTAILQ_HEAD(asyncs_head, UHCIAsync) asyncs;
102
+    QTAILQ_HEAD(, UHCIAsync) asyncs;
103 103
     int8_t    valid;
104 104
 };
105 105
 
@@ -837,7 +837,7 @@ static int uhci_handle_td(UHCIState *s, UHCIQueue *q, uint32_t qh_addr,
837 837
         }
838 838
         if (!async->done) {
839 839
             UHCI_TD last_td;
840
-            UHCIAsync *last = QTAILQ_LAST(&async->queue->asyncs, asyncs_head);
840
+            UHCIAsync *last = QTAILQ_LAST(&async->queue->asyncs);
841 841
             /*
842 842
              * While we are waiting for the current td to complete, the guest
843 843
              * may have added more tds to the queue. Note we re-read the td

+ 1
- 1
include/exec/memory.h View File

@@ -445,7 +445,7 @@ struct AddressSpace {
445 445
 
446 446
     int ioeventfd_nb;
447 447
     struct MemoryRegionIoeventfd *ioeventfds;
448
-    QTAILQ_HEAD(memory_listeners_as, MemoryListener) listeners;
448
+    QTAILQ_HEAD(, MemoryListener) listeners;
449 449
     QTAILQ_ENTRY(AddressSpace) address_spaces_link;
450 450
 };
451 451
 

+ 1
- 1
include/hw/qdev-core.h View File

@@ -206,7 +206,7 @@ struct BusState {
206 206
     HotplugHandler *hotplug_handler;
207 207
     int max_index;
208 208
     bool realized;
209
-    QTAILQ_HEAD(ChildrenHead, BusChild) children;
209
+    QTAILQ_HEAD(, BusChild) children;
210 210
     QLIST_ENTRY(BusState) sibling;
211 211
 };
212 212
 

+ 1
- 1
include/hw/usb.h View File

@@ -408,7 +408,7 @@ struct USBPacket {
408 408
 
409 409
 struct USBCombinedPacket {
410 410
     USBPacket *first;
411
-    QTAILQ_HEAD(packets_head, USBPacket) packets;
411
+    QTAILQ_HEAD(, USBPacket) packets;
412 412
     QEMUIOVector iov;
413 413
 };
414 414
 

+ 1
- 1
include/net/net.h View File

@@ -97,7 +97,7 @@ struct NetClientState {
97 97
     unsigned rxfilter_notify_enabled:1;
98 98
     int vring_enable;
99 99
     int vnet_hdr_len;
100
-    QTAILQ_HEAD(NetFilterHead, NetFilterState) filters;
100
+    QTAILQ_HEAD(, NetFilterState) filters;
101 101
 };
102 102
 
103 103
 typedef struct NICState {

+ 1
- 1
include/qemu/option_int.h View File

@@ -47,7 +47,7 @@ struct QemuOpts {
47 47
     char *id;
48 48
     QemuOptsList *list;
49 49
     Location loc;
50
-    QTAILQ_HEAD(QemuOptHead, QemuOpt) head;
50
+    QTAILQ_HEAD(, QemuOpt) head;
51 51
     QTAILQ_ENTRY(QemuOpts) next;
52 52
 };
53 53
 

+ 8
- 8
include/qemu/queue.h View File

@@ -432,14 +432,14 @@ union {                                                                 \
432 432
                 (var) && ((next_var) = ((var)->field.tqe_next), 1);     \
433 433
                 (var) = (next_var))
434 434
 
435
-#define QTAILQ_FOREACH_REVERSE(var, head, headname, field)              \
436
-        for ((var) = QTAILQ_LAST(head, headname);                       \
435
+#define QTAILQ_FOREACH_REVERSE(var, head, field)                        \
436
+        for ((var) = QTAILQ_LAST(head);                                 \
437 437
                 (var);                                                  \
438
-                (var) = QTAILQ_PREV(var, headname, field))
438
+                (var) = QTAILQ_PREV(var, field))
439 439
 
440
-#define QTAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, prev_var) \
441
-        for ((var) = QTAILQ_LAST(head, headname);                       \
442
-             (var) && ((prev_var) = QTAILQ_PREV(var, headname, field)); \
440
+#define QTAILQ_FOREACH_REVERSE_SAFE(var, head, field, prev_var)         \
441
+        for ((var) = QTAILQ_LAST(head);                                 \
442
+             (var) && ((prev_var) = QTAILQ_PREV(var, field));           \
443 443
              (var) = (prev_var))
444 444
 
445 445
 /*
@@ -452,9 +452,9 @@ union {                                                                 \
452 452
 
453 453
 #define QTAILQ_LINK_PREV(link)                                          \
454 454
         ((link).tql_prev->tql_prev->tql_next)
455
-#define QTAILQ_LAST(head, headname) \
455
+#define QTAILQ_LAST(head)                                               \
456 456
         ((typeof((head)->tqh_first)) QTAILQ_LINK_PREV((head)->tqh_circ))
457
-#define QTAILQ_PREV(elm, headname, field) \
457
+#define QTAILQ_PREV(elm, field)                                         \
458 458
         ((typeof((elm)->field.tqe_next)) QTAILQ_LINK_PREV((elm)->field.tqe_circ))
459 459
 
460 460
 #define field_at_offset(base, offset, type)                                    \

+ 1
- 1
include/sysemu/memory_mapping.h View File

@@ -36,7 +36,7 @@ typedef struct GuestPhysBlock {
36 36
 /* point-in-time snapshot of guest-visible physical mappings */
37 37
 typedef struct GuestPhysBlockList {
38 38
     unsigned num;
39
-    QTAILQ_HEAD(GuestPhysBlockHead, GuestPhysBlock) head;
39
+    QTAILQ_HEAD(, GuestPhysBlock) head;
40 40
 } GuestPhysBlockList;
41 41
 
42 42
 /* The physical and virtual address in the memory mapping are contiguous. */

+ 6
- 11
memory.c View File

@@ -39,7 +39,7 @@ static bool memory_region_update_pending;
39 39
 static bool ioeventfd_update_pending;
40 40
 static bool global_dirty_log = false;
41 41
 
42
-static QTAILQ_HEAD(memory_listeners, MemoryListener) memory_listeners
42
+static QTAILQ_HEAD(, MemoryListener) memory_listeners
43 43
     = QTAILQ_HEAD_INITIALIZER(memory_listeners);
44 44
 
45 45
 static QTAILQ_HEAD(, AddressSpace) address_spaces
@@ -113,8 +113,7 @@ enum ListenerDirection { Forward, Reverse };
113 113
             }                                                           \
114 114
             break;                                                      \
115 115
         case Reverse:                                                   \
116
-            QTAILQ_FOREACH_REVERSE(_listener, &memory_listeners,        \
117
-                                   memory_listeners, link) {            \
116
+            QTAILQ_FOREACH_REVERSE(_listener, &memory_listeners, link) { \
118 117
                 if (_listener->_callback) {                             \
119 118
                     _listener->_callback(_listener, ##_args);           \
120 119
                 }                                                       \
@@ -128,19 +127,17 @@ enum ListenerDirection { Forward, Reverse };
128 127
 #define MEMORY_LISTENER_CALL(_as, _callback, _direction, _section, _args...) \
129 128
     do {                                                                \
130 129
         MemoryListener *_listener;                                      \
131
-        struct memory_listeners_as *list = &(_as)->listeners;           \
132 130
                                                                         \
133 131
         switch (_direction) {                                           \
134 132
         case Forward:                                                   \
135
-            QTAILQ_FOREACH(_listener, list, link_as) {                  \
133
+            QTAILQ_FOREACH(_listener, &(_as)->listeners, link_as) {     \
136 134
                 if (_listener->_callback) {                             \
137 135
                     _listener->_callback(_listener, _section, ##_args); \
138 136
                 }                                                       \
139 137
             }                                                           \
140 138
             break;                                                      \
141 139
         case Reverse:                                                   \
142
-            QTAILQ_FOREACH_REVERSE(_listener, list, memory_listeners_as, \
143
-                                   link_as) {                           \
140
+            QTAILQ_FOREACH_REVERSE(_listener, &(_as)->listeners, link_as) { \
144 141
                 if (_listener->_callback) {                             \
145 142
                     _listener->_callback(_listener, _section, ##_args); \
146 143
                 }                                                       \
@@ -2691,8 +2688,7 @@ void memory_listener_register(MemoryListener *listener, AddressSpace *as)
2691 2688
 
2692 2689
     listener->address_space = as;
2693 2690
     if (QTAILQ_EMPTY(&memory_listeners)
2694
-        || listener->priority >= QTAILQ_LAST(&memory_listeners,
2695
-                                             memory_listeners)->priority) {
2691
+        || listener->priority >= QTAILQ_LAST(&memory_listeners)->priority) {
2696 2692
         QTAILQ_INSERT_TAIL(&memory_listeners, listener, link);
2697 2693
     } else {
2698 2694
         QTAILQ_FOREACH(other, &memory_listeners, link) {
@@ -2704,8 +2700,7 @@ void memory_listener_register(MemoryListener *listener, AddressSpace *as)
2704 2700
     }
2705 2701
 
2706 2702
     if (QTAILQ_EMPTY(&as->listeners)
2707
-        || listener->priority >= QTAILQ_LAST(&as->listeners,
2708
-                                             memory_listeners)->priority) {
2703
+        || listener->priority >= QTAILQ_LAST(&as->listeners)->priority) {
2709 2704
         QTAILQ_INSERT_TAIL(&as->listeners, listener, link_as);
2710 2705
     } else {
2711 2706
         QTAILQ_FOREACH(other, &as->listeners, link_as) {

+ 1
- 1
memory_mapping.c View File

@@ -223,7 +223,7 @@ static void guest_phys_blocks_region_add(MemoryListener *listener,
223 223
     if (!QTAILQ_EMPTY(&g->list->head)) {
224 224
         hwaddr predecessor_size;
225 225
 
226
-        predecessor = QTAILQ_LAST(&g->list->head, GuestPhysBlockHead);
226
+        predecessor = QTAILQ_LAST(&g->list->head);
227 227
         predecessor_size = predecessor->target_end - predecessor->target_start;
228 228
 
229 229
         /* the memory API guarantees monotonically increasing traversal */

+ 1
- 1
net/filter.c View File

@@ -55,7 +55,7 @@ static NetFilterState *netfilter_next(NetFilterState *nf,
55 55
         next = QTAILQ_NEXT(nf, next);
56 56
     } else {
57 57
         /* reverse order */
58
-        next = QTAILQ_PREV(nf, NetFilterHead, next);
58
+        next = QTAILQ_PREV(nf, next);
59 59
     }
60 60
 
61 61
     return next;

+ 1
- 1
net/net.c View File

@@ -563,7 +563,7 @@ static ssize_t filter_receive_iov(NetClientState *nc,
563 563
             }
564 564
         }
565 565
     } else {
566
-        QTAILQ_FOREACH_REVERSE(nf, &nc->filters, NetFilterHead, next) {
566
+        QTAILQ_FOREACH_REVERSE(nf, &nc->filters, next) {
567 567
             ret = qemu_netfilter_receive(nf, direction, sender, flags, iov,
568 568
                                          iovcnt, sent_cb);
569 569
             if (ret) {

+ 1
- 1
qga/commands-posix.c View File

@@ -1291,7 +1291,7 @@ int64_t qmp_guest_fsfreeze_freeze_list(bool has_mountpoints,
1291 1291
     /* cannot risk guest agent blocking itself on a write in this state */
1292 1292
     ga_set_frozen(ga_state);
1293 1293
 
1294
-    QTAILQ_FOREACH_REVERSE(mount, &mounts, FsMountList, next) {
1294
+    QTAILQ_FOREACH_REVERSE(mount, &mounts, next) {
1295 1295
         /* To issue fsfreeze in the reverse order of mounts, check if the
1296 1296
          * mount is listed in the list here */
1297 1297
         if (has_mountpoints) {

+ 2
- 2
tcg/tcg.c View File

@@ -2319,7 +2319,7 @@ static void reachable_code_pass(TCGContext *s)
2319 2319
                  * wait until the dead code in between them was removed.
2320 2320
                  */
2321 2321
                 if (label->refs == 1) {
2322
-                    TCGOp *op_prev = QTAILQ_PREV(op, TCGOpHead, link);
2322
+                    TCGOp *op_prev = QTAILQ_PREV(op, link);
2323 2323
                     if (op_prev->opc == INDEX_op_br &&
2324 2324
                         label == arg_label(op_prev->args[0])) {
2325 2325
                         tcg_op_remove(s, op_prev);
@@ -2481,7 +2481,7 @@ static void liveness_pass_1(TCGContext *s)
2481 2481
     /* ??? Should be redundant with the exit_tb that ends the TB.  */
2482 2482
     la_func_end(s, nb_globals, nb_temps);
2483 2483
 
2484
-    QTAILQ_FOREACH_REVERSE_SAFE(op, &s->ops, TCGOpHead, link, op_prev) {
2484
+    QTAILQ_FOREACH_REVERSE_SAFE(op, &s->ops, link, op_prev) {
2485 2485
         int nb_iargs, nb_oargs;
2486 2486
         TCGOpcode opc_new, opc_new2;
2487 2487
         bool have_opc_new2;

+ 2
- 2
tcg/tcg.h View File

@@ -719,7 +719,7 @@ struct TCGContext {
719 719
     TCGTempSet free_temps[TCG_TYPE_COUNT * 2];
720 720
     TCGTemp temps[TCG_MAX_TEMPS]; /* globals first, temps after */
721 721
 
722
-    QTAILQ_HEAD(TCGOpHead, TCGOp) ops, free_ops;
722
+    QTAILQ_HEAD(, TCGOp) ops, free_ops;
723 723
 
724 724
     /* Tells which temporary holds a given register.
725 725
        It does not take into account fixed registers */
@@ -847,7 +847,7 @@ static inline void tcg_set_insn_start_param(TCGOp *op, int arg, target_ulong v)
847 847
 /* The last op that was emitted.  */
848 848
 static inline TCGOp *tcg_last_op(void)
849 849
 {
850
-    return QTAILQ_LAST(&tcg_ctx->ops, TCGOpHead);
850
+    return QTAILQ_LAST(&tcg_ctx->ops);
851 851
 }
852 852
 
853 853
 /* Test for whether to terminate the TB for using too many opcodes.  */

+ 1
- 1
tests/libqos/malloc.c View File

@@ -104,7 +104,7 @@ static void mlist_coalesce(MemList *head, MemBlock *node)
104 104
 
105 105
     do {
106 106
         merge = 0;
107
-        left = QTAILQ_PREV(node, MemList, MLIST_ENTNAME);
107
+        left = QTAILQ_PREV(node, MLIST_ENTNAME);
108 108
         right = QTAILQ_NEXT(node, MLIST_ENTNAME);
109 109
 
110 110
         /* clowns to the left of me */

+ 4
- 4
tests/test-vmstate.c View File

@@ -630,7 +630,7 @@ struct TestQtailqElement {
630 630
 
631 631
 typedef struct TestQtailq {
632 632
     int16_t  i16;
633
-    QTAILQ_HEAD(TestQtailqHead, TestQtailqElement) q;
633
+    QTAILQ_HEAD(, TestQtailqElement) q;
634 634
     int32_t  i32;
635 635
 } TestQtailq;
636 636
 
@@ -735,9 +735,9 @@ static void test_load_q(void)
735 735
     g_assert_cmpint(eof, ==, QEMU_VM_EOF);
736 736
 
737 737
     TestQtailqElement *qele_from = QTAILQ_FIRST(&obj_q.q);
738
-    TestQtailqElement *qlast_from = QTAILQ_LAST(&obj_q.q, TestQtailqHead);
738
+    TestQtailqElement *qlast_from = QTAILQ_LAST(&obj_q.q);
739 739
     TestQtailqElement *qele_to = QTAILQ_FIRST(&tgt.q);
740
-    TestQtailqElement *qlast_to = QTAILQ_LAST(&tgt.q, TestQtailqHead);
740
+    TestQtailqElement *qlast_to = QTAILQ_LAST(&tgt.q);
741 741
 
742 742
     while (1) {
743 743
         g_assert_cmpint(qele_to->b, ==, qele_from->b);
@@ -755,7 +755,7 @@ static void test_load_q(void)
755 755
     /* clean up */
756 756
     TestQtailqElement *qele;
757 757
     while (!QTAILQ_EMPTY(&tgt.q)) {
758
-        qele = QTAILQ_LAST(&tgt.q, TestQtailqHead);
758
+        qele = QTAILQ_LAST(&tgt.q);
759 759
         QTAILQ_REMOVE(&tgt.q, qele, next);
760 760
         free(qele);
761 761
         qele = NULL;

+ 2
- 2
ui/console.c View File

@@ -182,7 +182,7 @@ struct DisplayState {
182 182
 
183 183
 static DisplayState *display_state;
184 184
 static QemuConsole *active_console;
185
-static QTAILQ_HEAD(consoles_head, QemuConsole) consoles =
185
+static QTAILQ_HEAD(, QemuConsole) consoles =
186 186
     QTAILQ_HEAD_INITIALIZER(consoles);
187 187
 static bool cursor_visible_phase;
188 188
 static QEMUTimer *cursor_timer;
@@ -1303,7 +1303,7 @@ static QemuConsole *new_console(DisplayState *ds, console_type_t console_type,
1303 1303
         s->index = 0;
1304 1304
         QTAILQ_INSERT_TAIL(&consoles, s, next);
1305 1305
     } else if (console_type != GRAPHIC_CONSOLE || qdev_hotplug) {
1306
-        QemuConsole *last = QTAILQ_LAST(&consoles, consoles_head);
1306
+        QemuConsole *last = QTAILQ_LAST(&consoles);
1307 1307
         s->index = last->index + 1;
1308 1308
         QTAILQ_INSERT_TAIL(&consoles, s, next);
1309 1309
     } else {

+ 2
- 2
util/qemu-option.c View File

@@ -280,7 +280,7 @@ QemuOpt *qemu_opt_find(QemuOpts *opts, const char *name)
280 280
 {
281 281
     QemuOpt *opt;
282 282
 
283
-    QTAILQ_FOREACH_REVERSE(opt, &opts->head, QemuOptHead, next) {
283
+    QTAILQ_FOREACH_REVERSE(opt, &opts->head, next) {
284 284
         if (strcmp(opt->name, name) != 0)
285 285
             continue;
286 286
         return opt;
@@ -379,7 +379,7 @@ bool qemu_opt_has_help_opt(QemuOpts *opts)
379 379
 {
380 380
     QemuOpt *opt;
381 381
 
382
-    QTAILQ_FOREACH_REVERSE(opt, &opts->head, QemuOptHead, next) {
382
+    QTAILQ_FOREACH_REVERSE(opt, &opts->head, next) {
383 383
         if (is_help_option(opt->name)) {
384 384
             return true;
385 385
         }

Loading…
Cancel
Save