From: Kevin Wolf Date: Thu, 8 Feb 2024 10:16:57 +0000 (+0100) Subject: iothread: Simplify expression in qemu_in_iothread() X-Git-Tag: v9.0.0-rc0~68^2~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=694226410bc1fd59cb379d0b90158679ea42ab03;p=thirdparty%2Fqemu.git 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 Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Michael Tokarev --- diff --git a/iothread.c b/iothread.c index 6c1fc8c8561..e1e9e047365 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(); }