diff mbox series

[RFC,1/5] junction: Replace xmlParseMemory

Message ID 170050641955.123525.14000282753998469753.stgit@manet.1015granger.net (mailing list archive)
State New
Headers show
Series Possible changes to nfs-utils junction support | expand

Commit Message

Chuck Lever Nov. 20, 2023, 6:53 p.m. UTC
From: Chuck Lever <chuck.lever@oracle.com>

According to:

https://gnome.pages.gitlab.gnome.org/libxml2/devhelp/libxml2-parser.html#xmlParseMemory

xmlParseMemory() is deprecated. Replace the one call site with a
call to xmlReadMemory().

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 support/junction/xml.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/support/junction/xml.c b/support/junction/xml.c
index 813110b4f308..ec9586528cc9 100644
--- a/support/junction/xml.c
+++ b/support/junction/xml.c
@@ -290,7 +290,7 @@  junction_parse_xml_buf(const char *pathname, const char *name,
 {
 	xmlDocPtr tmp;
 
-	tmp = xmlParseMemory(buf, (int)len);
+	tmp = xmlReadMemory(buf, (int)len, NULL, NULL, 0);
 	if (tmp == NULL) {
 		xlog(D_GENERAL, "Failed to parse XML in %s(%s)\n",
 			pathname, name);