mirror of
https://github.com/owntone/owntone-server.git
synced 2025-10-29 07:45:04 -04:00
[misc] Fix deprecation warning about referencing xmlBuffer->content
This commit is contained in:
parent
d051d787ba
commit
19012bf616
@ -61,6 +61,7 @@ char *
|
||||
xml_to_string(xml_node *top, const char *xml_declaration)
|
||||
{
|
||||
xmlBuffer *buf;
|
||||
const xmlChar *xml_string;
|
||||
char *s;
|
||||
|
||||
buf = xmlBufferCreate();
|
||||
@ -72,7 +73,9 @@ xml_to_string(xml_node *top, const char *xml_declaration)
|
||||
|
||||
xmlNodeDump(buf, top->doc, top, 0, 0);
|
||||
|
||||
s = strdup((char *)buf->content);
|
||||
xml_string = xmlBufferContent(buf);
|
||||
|
||||
s = xml_string ? strdup((char *)xml_string) : NULL;
|
||||
|
||||
xmlBufferFree(buf);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user