[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 10/15] iothread: Simplify expression in qemu_in_iothread()
From: |
Michael Tokarev |
Subject: |
[PULL 10/15] iothread: Simplify expression in qemu_in_iothread() |
Date: |
Tue, 13 Feb 2024 11:01:46 +0300 |
From: Kevin Wolf <kwolf@redhat.com>
'a == b ? false : true' is a rather convoluted way of writing 'a != b'.
Use the more obvious way to write it.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
iothread.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/iothread.c b/iothread.c
index 6c1fc8c856..e1e9e04736 100644
--- a/iothread.c
+++ b/iothread.c
@@ -404,6 +404,5 @@ IOThread *iothread_by_id(const char *id)
bool qemu_in_iothread(void)
{
- return qemu_get_current_aio_context() == qemu_get_aio_context() ?
- false : true;
+ return qemu_get_current_aio_context() != qemu_get_aio_context();
}
--
2.39.2
- [PULL 00/15] Trivial patches for 2024-02-13, Michael Tokarev, 2024/02/13
- [PULL 01/15] hw/isa/vt82c686: Consolidate the use of device_class_set_parent_realize(), Michael Tokarev, 2024/02/13
- [PULL 02/15] hw/isa/pc87312: Consolidate the use of device_class_set_parent_realize(), Michael Tokarev, 2024/02/13
- [PULL 07/15] MAINTAINERS: Cover qapi/cxl.json, Michael Tokarev, 2024/02/13
- [PULL 09/15] qemu-nbd: mention --tls-hostname option in qemu-nbd --help, Michael Tokarev, 2024/02/13
- [PULL 04/15] hw/arm/smmuv3: Consolidate the use of device_class_set_parent_realize(), Michael Tokarev, 2024/02/13
- [PULL 05/15] hw/smbios: Fix OEM strings table option validation, Michael Tokarev, 2024/02/13
- [PULL 06/15] hw/smbios: Fix port connector option validation, Michael Tokarev, 2024/02/13
- [PULL 03/15] hw/intc/s390_flic: Consolidate the use of device_class_set_parent_realize(), Michael Tokarev, 2024/02/13
- [PULL 08/15] MAINTAINERS: Cover qapi/stats.json, Michael Tokarev, 2024/02/13
- [PULL 10/15] iothread: Simplify expression in qemu_in_iothread(),
Michael Tokarev <=
- [PULL 12/15] qemu-options.hx: Add zoom-to-fit to option summary for gtk, Michael Tokarev, 2024/02/13
- [PULL 11/15] qemu-options.hx: document that tftp=dir is readonly, Michael Tokarev, 2024/02/13
- [PULL 13/15] system: Move memory_ldst.c.inc to system, Michael Tokarev, 2024/02/13
- [PULL 14/15] cpu-target: Include missing 'exec/memory.h' header, Michael Tokarev, 2024/02/13
- [PULL 15/15] monitor/target: Include missing 'exec/memory.h' header, Michael Tokarev, 2024/02/13
- Re: [PULL 00/15] Trivial patches for 2024-02-13, Peter Maydell, 2024/02/13