diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2018-12-06 13:10:34 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2019-01-11 15:46:55 +0100 |
commit | eae3eb3e185028d6e862db747e3b7397600d6762 (patch) | |
tree | 359a23639a6db7a77407cf8f366564561b970738 /ui | |
parent | 7274f01bb8b81ffe8f13f463b6b0f3b9246c5387 (diff) |
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 'ui')
-rw-r--r-- | ui/console.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/console.c b/ui/console.c index 7076becedd..6d2282d3e9 100644 --- a/ui/console.c +++ b/ui/console.c @@ -182,7 +182,7 @@ struct DisplayState { static DisplayState *display_state; static QemuConsole *active_console; -static QTAILQ_HEAD(consoles_head, QemuConsole) consoles = +static QTAILQ_HEAD(, QemuConsole) consoles = QTAILQ_HEAD_INITIALIZER(consoles); static bool cursor_visible_phase; static QEMUTimer *cursor_timer; @@ -1303,7 +1303,7 @@ static QemuConsole *new_console(DisplayState *ds, console_type_t console_type, s->index = 0; QTAILQ_INSERT_TAIL(&consoles, s, next); } else if (console_type != GRAPHIC_CONSOLE || qdev_hotplug) { - QemuConsole *last = QTAILQ_LAST(&consoles, consoles_head); + QemuConsole *last = QTAILQ_LAST(&consoles); s->index = last->index + 1; QTAILQ_INSERT_TAIL(&consoles, s, next); } else { |