]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: monitor: Remove temporary variables
authorPeter Krempa <pkrempa@redhat.com>
Tue, 14 Aug 2018 10:51:15 +0000 (12:51 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 24 Aug 2018 11:52:44 +0000 (13:52 +0200)
Now that the job name is used in single place in the respective
functions remove the temporary strings.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
src/qemu/qemu_monitor_json.c

index a8019a06d5f5e5a5fc87b97fc510c9c9b84c8bbe..0eb789768540a0873b0bde6c49df87c366f16a85 100644 (file)
@@ -4821,9 +4821,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,
@@ -4853,9 +4852,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;
@@ -4883,9 +4881,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)))