Remove the seldom used helper in favor of full virXMLParse. Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- src/conf/domain_conf.c | 6 ++++-- src/conf/storage_conf.c | 6 ++---- src/util/virxml.h | 4 ---- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 70501ca768..7dba65cfeb 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -13655,7 +13655,8 @@ virDomainDiskDefParse(const char *xmlStr, g_autoptr(xmlDoc) xml = NULL; g_autoptr(xmlXPathContext) ctxt = NULL; - if (!(xml = virXMLParseStringCtxtRoot(xmlStr, _("(disk_definition)"), "disk", &ctxt))) + if (!(xml = virXMLParse(NULL, xmlStr, _("(disk_definition)"), + "disk", &ctxt, NULL, false))) return NULL; return virDomainDiskDefParseXML(xmlopt, ctxt->node, ctxt, flags); @@ -13672,7 +13673,8 @@ virDomainDiskDefParseSource(const char *xmlStr, g_autoptr(virStorageSource) src = NULL; xmlNodePtr driverNode; - if (!(xml = virXMLParseStringCtxtRoot(xmlStr, _("(disk_definition)"), "disk", &ctxt))) + if (!(xml = virXMLParse(NULL, xmlStr, _("(disk_definition)"), + "disk", &ctxt, NULL, false))) return NULL; if (!(src = virDomainDiskDefParseSourceXML(xmlopt, ctxt->node, ctxt, flags))) diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index 4f2f9e7fb1..0f4fe1451e 100644 --- a/src/conf/storage_conf.c +++ b/src/conf/storage_conf.c @@ -667,10 +667,8 @@ virStoragePoolDefParseSourceString(const char *srcSpec, g_autoptr(xmlXPathContext) xpath_ctxt = NULL; g_autoptr(virStoragePoolSource) def = NULL; - if (!(doc = virXMLParseStringCtxtRoot(srcSpec, - _("(storage_source_specification)"), - "source", - &xpath_ctxt))) + if (!(doc = virXMLParse(NULL, srcSpec, _("(storage_source_specification)"), + "source", &xpath_ctxt, NULL, false))) return NULL; def = g_new0(virStoragePoolSource, 1); diff --git a/src/util/virxml.h b/src/util/virxml.h index 9ec4920807..2b442d60fe 100644 --- a/src/util/virxml.h +++ b/src/util/virxml.h @@ -230,10 +230,6 @@ virXMLPickShellSafeComment(const char *str1, #define virXMLParseStringCtxt(xmlStr, url, pctxt) \ virXMLParseHelper(VIR_FROM_THIS, NULL, xmlStr, url, NULL, pctxt, NULL, false) -/* virXMLParseStringCtxtRoot is same as above, except it also validates root node name */ -#define virXMLParseStringCtxtRoot(xmlStr, url, rootnode, pctxt) \ - virXMLParseHelper(VIR_FROM_THIS, NULL, xmlStr, url, rootnode, pctxt, NULL, false) - /** * virXMLParseFileCtxt: * @filename: file to parse -- 2.37.3