]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
vbox: do not repeat the innotek namespace url
authorJán Tomko <jtomko@redhat.com>
Tue, 25 Aug 2020 22:42:56 +0000 (00:42 +0200)
committerJán Tomko <jtomko@redhat.com>
Tue, 1 Sep 2020 19:58:45 +0000 (21:58 +0200)
Also, remove the url from the translatable string,
reducing it to the generic message already used
by virXMLNamespaceRegister.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
src/vbox/vbox_snapshot_conf.c

index ee644e1e2dc56370e4ff72f3f904587eaf646845..a18958fcc06611c98f9642d01cba5eea8302a589 100644 (file)
@@ -571,6 +571,8 @@ virVBoxSnapshotConfMachineFree(virVBoxSnapshotConfMachinePtr machine)
     VIR_FREE(machine);
 }
 
+#define VBOX_SETTINGS_NS "http://www.innotek.de/VirtualBox-settings"
+
 /*
  *vboxSnapshotLoadVboxFile: Create a vboxSnapshotXmlMachinePtr from a VirtualBoxl xml file.
  *return an initialized vboxSnapshotXmlMachinePtr on success
@@ -613,10 +615,10 @@ virVBoxSnapshotConfLoadVboxFile(const char *filePath,
 
     if (xmlXPathRegisterNs(xPathContext,
                            BAD_CAST "vbox",
-                           BAD_CAST "http://www.innotek.de/VirtualBox-settings") < 0) {
-        virReportError(VIR_ERR_XML_ERROR, "%s",
-                       _("Failed to register xml namespace "
-                         "'http://www.innotek.de/VirtualBox-settings'"));
+                           BAD_CAST VBOX_SETTINGS_NS) < 0) {
+        virReportError(VIR_ERR_XML_ERROR,
+                       _("Failed to register xml namespace '%s'"),
+                       VBOX_SETTINGS_NS);
         goto cleanup;
     }
 
@@ -1015,7 +1017,7 @@ virVBoxSnapshotConfSaveVboxFile(virVBoxSnapshotConfMachinePtr machine,
     }
     if (xmlNewProp(cur,
                    BAD_CAST "xmlns",
-                   BAD_CAST "http://www.innotek.de/VirtualBox-settings") == NULL) {
+                   BAD_CAST VBOX_SETTINGS_NS) == NULL) {
         virReportError(VIR_ERR_XML_ERROR, "%s",
                        _("Error in xmlNewProp"));
         goto cleanup;