mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-26 03:21:44 +03:00
qemu_monitor_json.c: modernize qemuMonitorJSONMigrateIncoming()
Use g_autoptr() and remove the now obsolete 'cleanup' label. Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
b75ff9a194
commit
d9ea60c0a0
@ -8405,9 +8405,8 @@ int
|
|||||||
qemuMonitorJSONMigrateIncoming(qemuMonitorPtr mon,
|
qemuMonitorJSONMigrateIncoming(qemuMonitorPtr mon,
|
||||||
const char *uri)
|
const char *uri)
|
||||||
{
|
{
|
||||||
int ret = -1;
|
g_autoptr(virJSONValue) cmd = NULL;
|
||||||
virJSONValuePtr cmd;
|
g_autoptr(virJSONValue) reply = NULL;
|
||||||
virJSONValuePtr reply = NULL;
|
|
||||||
|
|
||||||
if (!(cmd = qemuMonitorJSONMakeCommand("migrate-incoming",
|
if (!(cmd = qemuMonitorJSONMakeCommand("migrate-incoming",
|
||||||
"s:uri", uri,
|
"s:uri", uri,
|
||||||
@ -8415,14 +8414,9 @@ qemuMonitorJSONMigrateIncoming(qemuMonitorPtr mon,
|
|||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
|
if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
|
||||||
goto cleanup;
|
return -1;
|
||||||
|
|
||||||
ret = qemuMonitorJSONCheckError(cmd, reply);
|
return qemuMonitorJSONCheckError(cmd, reply);
|
||||||
|
|
||||||
cleanup:
|
|
||||||
virJSONValueFree(cmd);
|
|
||||||
virJSONValueFree(reply);
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user