]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: qemuDomainRenameCallback: remove unused variables master
authorRoman Bogorodskiy <bogorodskiy@gmail.com>
Sat, 4 Jul 2026 06:37:50 +0000 (08:37 +0200)
committerRoman Bogorodskiy <bogorodskiy@gmail.com>
Fri, 10 Jul 2026 16:36:49 +0000 (18:36 +0200)
The old_dom_cfg_file and old_dom_autostart_link variables are
assigned to, but never really used, so remove them.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
src/qemu/qemu_driver.c

index 8ec9e1f9c490ec0116527d8bccf70226df8e6c5a..3d57de389bc01d184eccf8111d587a00c70b4839 100644 (file)
@@ -19029,9 +19029,7 @@ qemuDomainRenameCallback(virDomainObj *vm,
     g_autofree char *new_dom_name = NULL;
     g_autofree char *old_dom_name = NULL;
     g_autofree char *new_dom_cfg_file = NULL;
-    g_autofree char *old_dom_cfg_file = NULL;
     g_autofree char *new_dom_autostart_link = NULL;
-    g_autofree char *old_dom_autostart_link = NULL;
     struct qemuDomainMomentWriteMetadataData data = {
         .driver = driver,
         .vm = vm,
@@ -19050,14 +19048,12 @@ qemuDomainRenameCallback(virDomainObj *vm,
     new_dom_name = g_strdup(new_name);
 
     new_dom_cfg_file = virDomainConfigFile(cfg->configDir, new_dom_name);
-    old_dom_cfg_file = virDomainConfigFile(cfg->configDir, vm->def->name);
 
     if (qemuDomainNamePathsCleanup(cfg, new_name, false) < 0)
         goto cleanup;
 
     if (vm->autostart) {
         new_dom_autostart_link = virDomainConfigFile(cfg->autostartDir, new_dom_name);
-        old_dom_autostart_link = virDomainConfigFile(cfg->autostartDir, vm->def->name);
 
         if (symlink(new_dom_cfg_file, new_dom_autostart_link) < 0) {
             virReportSystemError(errno,