Переглянути джерело

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>
Kevin Wolf 1 рік тому
батько
коміт
694226410b
1 змінених файлів з 1 додано та 2 видалено
  1. 1 2
      iothread.c

+ 1 - 2
iothread.c

@@ -404,6 +404,5 @@ IOThread *iothread_by_id(const char *id)
 
 
 bool qemu_in_iothread(void)
 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();
 }
 }