]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
vbox: remove unreachable error in virVBoxSnapshotConfSaveVboxFile
authorJán Tomko <jtomko@redhat.com>
Sat, 18 Mar 2023 11:34:47 +0000 (12:34 +0100)
committerJán Tomko <jtomko@redhat.com>
Mon, 20 Mar 2023 13:32:40 +0000 (14:32 +0100)
Both callers in the VirtualBox driver handle the error and only
call this function with a non-NULL argument.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
src/vbox/vbox_snapshot_conf.c

index a6e5fad4d2379d354daa75bfea4893f6c3781091..78fb360e1e7d8e4a2dbf822325f053819c105307 100644 (file)
@@ -952,11 +952,6 @@ virVBoxSnapshotConfSaveVboxFile(virVBoxSnapshotConfMachine *machine,
                        _("Machine is null"));
         goto cleanup;
     }
-    if (filePath == NULL) {
-        virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
-                       _("Filepath is null"));
-        goto cleanup;
-    }
     xml = xmlNewDoc(BAD_CAST "1.0");
     if (!xml)
         abort();