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,
|
||||
const char *uri)
|
||||
{
|
||||
int ret = -1;
|
||||
virJSONValuePtr cmd;
|
||||
virJSONValuePtr reply = NULL;
|
||||
g_autoptr(virJSONValue) cmd = NULL;
|
||||
g_autoptr(virJSONValue) reply = NULL;
|
||||
|
||||
if (!(cmd = qemuMonitorJSONMakeCommand("migrate-incoming",
|
||||
"s:uri", uri,
|
||||
@ -8415,14 +8414,9 @@ qemuMonitorJSONMigrateIncoming(qemuMonitorPtr mon,
|
||||
return -1;
|
||||
|
||||
if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
|
||||
goto cleanup;
|
||||
return -1;
|
||||
|
||||
ret = qemuMonitorJSONCheckError(cmd, reply);
|
||||
|
||||
cleanup:
|
||||
virJSONValueFree(cmd);
|
||||
virJSONValueFree(reply);
|
||||
return ret;
|
||||
return qemuMonitorJSONCheckError(cmd, reply);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user