From: Ján Tomko Date: Tue, 25 Aug 2020 22:42:56 +0000 (+0200) Subject: vbox: do not repeat the innotek namespace url X-Git-Tag: v6.8.0-rc1~334 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=42161929291a6a2086d2402b30a6c3f289732ee3;p=thirdparty%2Flibvirt.git vbox: do not repeat the innotek namespace url Also, remove the url from the translatable string, reducing it to the generic message already used by virXMLNamespaceRegister. Signed-off-by: Ján Tomko Reviewed-by: Erik Skultety Reviewed-by: Neal Gompa --- diff --git a/src/vbox/vbox_snapshot_conf.c b/src/vbox/vbox_snapshot_conf.c index ee644e1e2d..a18958fcc0 100644 --- a/src/vbox/vbox_snapshot_conf.c +++ b/src/vbox/vbox_snapshot_conf.c @@ -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;