qemu: monitor: Remove temporary variables

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>
This commit is contained in:
Peter Krempa 2018-08-14 12:51:15 +02:00
parent 0ab2a65314
commit 9c9c5766e1

View 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)))