[spotify] Use string_printf instead of asprintf

This commit is contained in:
chme 2017-04-09 09:16:35 +02:00
parent 4e6b78ca29
commit 6887ff9d7b
1 changed files with 2 additions and 2 deletions

View File

@ -244,9 +244,9 @@ spotifywebapi_request_next(struct spotify_request *request, const char *uri, boo
if (append_market && spotify_user_country) if (append_market && spotify_user_country)
{ {
if (strchr(uri, '?')) if (strchr(uri, '?'))
asprintf(&next_uri, "%s&market=%s", uri, spotify_user_country); next_uri = string_printf("%s&market=%s", uri, spotify_user_country);
else else
asprintf(&next_uri, "%s?market=%s", uri, spotify_user_country); next_uri = string_printf("%s?market=%s", uri, spotify_user_country);
} }
else else
next_uri = strdup(uri); next_uri = strdup(uri);