]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
vbox: remove unreachable error in virVBoxSnapshotConfLoadVboxFile
authorJán Tomko <jtomko@redhat.com>
Sat, 18 Mar 2023 11:33:17 +0000 (12:33 +0100)
committerJán Tomko <jtomko@redhat.com>
Mon, 20 Mar 2023 13:32:40 +0000 (14:32 +0100)
Both callers in the VirtualBox driver error out if the path
can't be fetched via VirtualBox APIs and abort on conversion error
from UTF-16 to UTF-8.

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

index 2f3f48d68846c8451c2cda6ffc8352fa4c2c15ca..a6e5fad4d2379d354daa75bfea4893f6c3781091 100644 (file)
@@ -576,12 +576,6 @@ virVBoxSnapshotConfLoadVboxFile(const char *filePath,
     ssize_t searchResultSize = 0;
     char *currentSnapshotAttribute = NULL;
 
-    if (filePath == NULL) {
-        virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
-                       _("Filepath is Null"));
-        goto cleanup;
-    }
-
     machineDescription = g_new0(virVBoxSnapshotConfMachine, 1);
 
     xml = virXMLParse(filePath, NULL, NULL, NULL, &xPathContext, NULL, false);