[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 76/76] queue: fix QTAILQ_FOREACH_REVERSE_SAFE
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 76/76] queue: fix QTAILQ_FOREACH_REVERSE_SAFE |
Date: |
Tue, 5 Feb 2019 19:15:26 +0100 |
The iteration was stopping as soon as prev_var was set to NULL, and
therefore it skipped the first element. Fortunately, or unfortunately,
we have only one use of QTAILQ_FOREACH_REVERSE_SAFE. Thus this only
showed up as incorrect register preferences on the very first translation
block that was compiled.
Reported-by: Thomas Huth <address@hidden>
Reviewed-by: Emilio G. Cota <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
include/qemu/queue.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/qemu/queue.h b/include/qemu/queue.h
index 1f8e219..0379bd8 100644
--- a/include/qemu/queue.h
+++ b/include/qemu/queue.h
@@ -439,7 +439,7 @@ union {
\
#define QTAILQ_FOREACH_REVERSE_SAFE(var, head, field, prev_var) \
for ((var) = QTAILQ_LAST(head); \
- (var) && ((prev_var) = QTAILQ_PREV(var, field)); \
+ (var) && ((prev_var) = QTAILQ_PREV(var, field), 1); \
(var) = (prev_var))
/*
--
1.8.3.1
- [Qemu-devel] [PULL 33/76] crypto: finish removing TABs, (continued)
- [Qemu-devel] [PULL 33/76] crypto: finish removing TABs, Paolo Bonzini, 2019/02/05
- [Qemu-devel] [PULL 56/76] hw/sh4/Makefile.objs: New CONFIG_* varibales created for sh4 boards and device, Paolo Bonzini, 2019/02/05
- [Qemu-devel] [PULL 57/76] hw/s390/Makefile.objs: Create new CONFIG_* variables for s390x boards and devices, Paolo Bonzini, 2019/02/05
- [Qemu-devel] [PULL 58/76] hw/sparc/Makefile.objs: CONFIG_* for sun4m and leon3 created, Paolo Bonzini, 2019/02/05
- [Qemu-devel] [PULL 59/76] hw/lm32/Makefile.objs: Conditionally build lm32 and milkmyst, Paolo Bonzini, 2019/02/05
- [Qemu-devel] [PULL 63/76] hw/sparc64/Makefile.objs: Create CONFIG_* for sparc64, Paolo Bonzini, 2019/02/05
- [Qemu-devel] [PULL 60/76] hw/xtensa/Makefile.objs: Build xtensa_sim and xtensa_fpga conditionally, Paolo Bonzini, 2019/02/05
- [Qemu-devel] [PULL 72/76] i386: hvf: Fix smp boot hangs, Paolo Bonzini, 2019/02/05
- [Qemu-devel] [PULL 67/76] hw/moxie/Makefile.objs: Conditionally build moxie, Paolo Bonzini, 2019/02/05
- [Qemu-devel] [PULL 73/76] pc: Use hotplug_handler_(plug|unplug|unplug_request), Paolo Bonzini, 2019/02/05
- [Qemu-devel] [PULL 76/76] queue: fix QTAILQ_FOREACH_REVERSE_SAFE,
Paolo Bonzini <=
- [Qemu-devel] [PULL 65/76] hw/cris/Makefile.objs: Create CONFIG_* for cris, Paolo Bonzini, 2019/02/05
- [Qemu-devel] [PULL 68/76] hw/openrisc/Makefile.objs: Create CONFIG_* for openrisc, Paolo Bonzini, 2019/02/05
- [Qemu-devel] [PULL 64/76] hw/alpha/Makefile.objs: Create CONFIG_* for alpha, Paolo Bonzini, 2019/02/05
- [Qemu-devel] [PULL 61/76] hw/nios2/Makefile.objs: Conditionally build nios2, Paolo Bonzini, 2019/02/05
- [Qemu-devel] [PULL 69/76] hw/tricore/Makefile.objs: Create CONFIG_* for tricore, Paolo Bonzini, 2019/02/05
- [Qemu-devel] [PULL 66/76] hw/hppa/Makefile.objs: Create CONFIG_* for hppa, Paolo Bonzini, 2019/02/05
- [Qemu-devel] [PULL 71/76] hw/vfio/Makefile.objs: Create new CONFIG_* variables for VFIO core and PCI, Paolo Bonzini, 2019/02/05
- [Qemu-devel] [PULL 74/76] scsi-disk: Convert from DPRINTF() macro to trace events, Paolo Bonzini, 2019/02/05
- [Qemu-devel] [PULL 70/76] hw/i2c/Makefile.objs: Create new CONFIG_* variables for EEPROM and ACPI controller, Paolo Bonzini, 2019/02/05
- [Qemu-devel] [PULL 62/76] hw/riscv/Makefile.objs: Create CONFIG_* for riscv boards, Paolo Bonzini, 2019/02/05