aboutsummaryrefslogtreecommitdiff
path: root/iothread.c
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2024-02-08 11:16:57 +0100
committerMichael Tokarev <mjt@tls.msk.ru>2024-02-13 10:59:25 +0300
commit694226410bc1fd59cb379d0b90158679ea42ab03 (patch)
tree37d7945e4be3c49e64a9d8c017177498a019d149 /iothread.c
parentd81b797ca26e4cfbee5c7578c64f381c79caa5d1 (diff)
downloadqemu-694226410bc1fd59cb379d0b90158679ea42ab03.zip
qemu-694226410bc1fd59cb379d0b90158679ea42ab03.tar.gz
qemu-694226410bc1fd59cb379d0b90158679ea42ab03.tar.bz2
iothread: Simplify expression in qemu_in_iothread()
'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>
Diffstat (limited to 'iothread.c')
-rw-r--r--iothread.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/iothread.c b/iothread.c
index 6c1fc8c..e1e9e04 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();
}