Instead of a ternary operator we can use the existing helper. Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- src/qemu/qemu_monitor_json.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 1ecb06895c..4b339db399 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -574,7 +574,7 @@ static void qemuMonitorJSONHandleShutdown(qemuMonitor *mon, virJSONValue *data) virTristateBool guest_initiated = VIR_TRISTATE_BOOL_ABSENT; if (data && virJSONValueObjectGetBoolean(data, "guest", &guest) == 0) - guest_initiated = guest ? VIR_TRISTATE_BOOL_YES : VIR_TRISTATE_BOOL_NO; + guest_initiated = virTristateBoolFromBool(guest); qemuMonitorEmitShutdown(mon, guest_initiated); } -- 2.31.1