[PATCH 3/8] qemu: monitor: Remove temporary variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Now that the job name is used in single place in the respective
functions remove the temporary strings.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/qemu/qemu_monitor_json.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index a361a0acd9..931d3dd985 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -4686,9 +4686,8 @@ qemuMonitorJSONBlockStream(qemuMonitorPtr mon,
     int ret = -1;
     virJSONValuePtr cmd = NULL;
     virJSONValuePtr reply = NULL;
-    const char *cmd_name = "block-stream";

-    if (!(cmd = qemuMonitorJSONMakeCommand(cmd_name,
+    if (!(cmd = qemuMonitorJSONMakeCommand("block-stream",
                                            "s:device", device,
                                            "Y:speed", speed,
                                            "S:base", base,
@@ -4718,9 +4717,8 @@ qemuMonitorJSONBlockJobCancel(qemuMonitorPtr mon,
     int ret = -1;
     virJSONValuePtr cmd = NULL;
     virJSONValuePtr reply = NULL;
-    const char *cmd_name = "block-job-cancel";

-    if (!(cmd = qemuMonitorJSONMakeCommand(cmd_name,
+    if (!(cmd = qemuMonitorJSONMakeCommand("block-job-cancel",
                                            "s:device", device,
                                            NULL)))
         return -1;
@@ -4748,9 +4746,8 @@ qemuMonitorJSONBlockJobSetSpeed(qemuMonitorPtr mon,
     int ret = -1;
     virJSONValuePtr cmd;
     virJSONValuePtr reply = NULL;
-    const char *cmd_name = "block-job-set-speed";

-    if (!(cmd = qemuMonitorJSONMakeCommand(cmd_name,
+    if (!(cmd = qemuMonitorJSONMakeCommand("block-job-set-speed",
                                            "s:device", device,
                                            "J:speed", speed,
                                            NULL)))
-- 
2.16.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux