Skip to content

Commit f94cff1

Browse files
xspf: Use xmlChar type correctly
xmlFree() requires an xmlChar*, not char*.
1 parent 63944b1 commit f94cff1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/xspf/xspf.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,10 @@ static void xspf_add_file (xmlNode * track, const char * filename,
113113
if (xmlStrEqual (nptr->name, (xmlChar *) "location"))
114114
{
115115
/* Location is a special case */
116-
char * str = (char *) xmlNodeGetContent (nptr);
116+
xmlChar * str = xmlNodeGetContent (nptr);
117117

118-
if (strstr (str, "://"))
119-
location = String (str);
118+
if (strstr ((char *) str, "://"))
119+
location = String ((char *) str);
120120
else if (str[0] == '/' && base)
121121
{
122122
const char * colon = strstr (base, "://");
@@ -226,7 +226,7 @@ bool XSPFLoader::load (const char * filename, VFSFile & file, String & title,
226226
! xmlStrEqual (nptr->name, (xmlChar *) "playlist"))
227227
continue;
228228

229-
char * base = (char *) xmlNodeGetBase (doc, nptr);
229+
xmlChar * base = xmlNodeGetBase (doc, nptr);
230230

231231
for (xmlNode * nptr2 = nptr->children; nptr2; nptr2 = nptr2->next)
232232
{
@@ -241,7 +241,7 @@ bool XSPFLoader::load (const char * filename, VFSFile & file, String & title,
241241
xmlFree (xml_title);
242242
}
243243
else if (xmlStrEqual (nptr2->name, (xmlChar *) "trackList"))
244-
xspf_find_track (nptr2, filename, base, items);
244+
xspf_find_track (nptr2, filename, (char *) base, items);
245245
}
246246

247247
xmlFree (base);

0 commit comments

Comments
 (0)