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 <jto...@redhat.com>
---
 src/vbox/vbox_snapshot_conf.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/src/vbox/vbox_snapshot_conf.c b/src/vbox/vbox_snapshot_conf.c
index a6e5fad4d2..78fb360e1e 100644
--- a/src/vbox/vbox_snapshot_conf.c
+++ b/src/vbox/vbox_snapshot_conf.c
@@ -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();
-- 
2.39.2

Reply via email to