mirror of
https://github.com/owntone/owntone-server.git
synced 2025-10-29 15:55:02 -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)
|
xml_to_string(xml_node *top, const char *xml_declaration)
|
||||||
{
|
{
|
||||||
xmlBuffer *buf;
|
xmlBuffer *buf;
|
||||||
|
const xmlChar *xml_string;
|
||||||
char *s;
|
char *s;
|
||||||
|
|
||||||
buf = xmlBufferCreate();
|
buf = xmlBufferCreate();
|
||||||
@ -72,7 +73,9 @@ xml_to_string(xml_node *top, const char *xml_declaration)
|
|||||||
|
|
||||||
xmlNodeDump(buf, top->doc, top, 0, 0);
|
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);
|
xmlBufferFree(buf);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user