From: Ján Tomko Date: Sat, 18 Mar 2023 11:33:17 +0000 (+0100) Subject: vbox: remove unreachable error in virVBoxSnapshotConfLoadVboxFile X-Git-Tag: v9.2.0-rc1~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d2a430f90a8d63ed76d2b2cf1c58a9c6260a6fac;p=thirdparty%2Flibvirt.git vbox: remove unreachable error in virVBoxSnapshotConfLoadVboxFile 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 Reviewed-by: Laine Stump --- diff --git a/src/vbox/vbox_snapshot_conf.c b/src/vbox/vbox_snapshot_conf.c index 2f3f48d688..a6e5fad4d2 100644 --- a/src/vbox/vbox_snapshot_conf.c +++ b/src/vbox/vbox_snapshot_conf.c @@ -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);