Skip to content

Commit 6942264

Browse files
kevmwMichael Tokarev
authored and
Michael Tokarev
committed
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 <[email protected]> Reviewed-by: Laurent Vivier <[email protected]> Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Signed-off-by: Michael Tokarev <[email protected]>
1 parent d81b797 commit 6942264

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

iothread.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,5 @@ IOThread *iothread_by_id(const char *id)
404404

405405
bool qemu_in_iothread(void)
406406
{
407-
return qemu_get_current_aio_context() == qemu_get_aio_context() ?
408-
false : true;
407+
return qemu_get_current_aio_context() != qemu_get_aio_context();
409408
}

0 commit comments

Comments
 (0)