]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemuMonitorJSONEjectMedia: Use a bool directly for constructing JSON with 'b' modifier
authorPeter Krempa <pkrempa@redhat.com>
Tue, 30 Nov 2021 15:08:29 +0000 (16:08 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 7 Dec 2021 08:00:39 +0000 (09:00 +0100)
It actually already expects a bool.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_monitor_json.c

index b45aae9d963e1348f810a7b2e7a4fb68a72a140c..652f6b31ab9b9e6167aaf3cda96683d9073da1f4 100644 (file)
@@ -2970,7 +2970,7 @@ int qemuMonitorJSONEjectMedia(qemuMonitor *mon,
 {
     g_autoptr(virJSONValue) cmd = qemuMonitorJSONMakeCommand("eject",
                                                              "s:device", dev_name,
-                                                             "b:force", force ? 1 : 0,
+                                                             "b:force", force,
                                                              NULL);
     g_autoptr(virJSONValue) reply = NULL;