mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33: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
|
@ -280,7 +280,7 @@ QemuOpt *qemu_opt_find(QemuOpts *opts, const char *name)
|
|||
{
|
||||
QemuOpt *opt;
|
||||
|
||||
QTAILQ_FOREACH_REVERSE(opt, &opts->head, QemuOptHead, next) {
|
||||
QTAILQ_FOREACH_REVERSE(opt, &opts->head, next) {
|
||||
if (strcmp(opt->name, name) != 0)
|
||||
continue;
|
||||
return opt;
|
||||
|
@ -379,7 +379,7 @@ bool qemu_opt_has_help_opt(QemuOpts *opts)
|
|||
{
|
||||
QemuOpt *opt;
|
||||
|
||||
QTAILQ_FOREACH_REVERSE(opt, &opts->head, QemuOptHead, next) {
|
||||
QTAILQ_FOREACH_REVERSE(opt, &opts->head, next) {
|
||||
if (is_help_option(opt->name)) {
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue