mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 14:15:28 +00:00
qemu: rename: return instead of goto if no cleanup required
Going to cleanup label is mere return -1 thus let's just return instead of goto to this label. Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com> Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
This commit is contained in:
parent
9a5ac61c4e
commit
a6c3b5e6a1
@ -19130,20 +19130,20 @@ qemuDomainRenameCallback(virDomainObjPtr vm,
|
||||
new_dom_name)) ||
|
||||
!(old_dom_cfg_file = virDomainConfigFile(cfg->configDir,
|
||||
vm->def->name)))
|
||||
goto cleanup;
|
||||
return -1;
|
||||
|
||||
if (vm->autostart) {
|
||||
if (!(new_dom_autostart_link = virDomainConfigFile(cfg->autostartDir,
|
||||
new_dom_name)) ||
|
||||
!(old_dom_autostart_link = virDomainConfigFile(cfg->autostartDir,
|
||||
vm->def->name)))
|
||||
goto cleanup;
|
||||
return -1;
|
||||
|
||||
if (symlink(new_dom_cfg_file, new_dom_autostart_link) < 0) {
|
||||
virReportSystemError(errno,
|
||||
_("Failed to create symlink '%s to '%s'"),
|
||||
new_dom_autostart_link, new_dom_cfg_file);
|
||||
goto cleanup;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user