summaryrefslogtreecommitdiff
path: root/src/playlist/plugins
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2017-01-20 17:16:11 +0100
committerMax Kellermann <max@musicpd.org>2017-01-20 17:16:11 +0100
commitd91d5a3ab5164fbb9f14130aa6a17817bc8898a8 (patch)
tree865361be0f1298a8c4cd4ce22d56ad0644fba240 /src/playlist/plugins
parent907c045f33468149bb1174c24820ebfa8e608769 (diff)
playlist/SoundCloud: eliminate unnecessary casted variable
Diffstat (limited to 'src/playlist/plugins')
-rw-r--r--src/playlist/plugins/SoundCloudPlaylistPlugin.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/playlist/plugins/SoundCloudPlaylistPlugin.cxx b/src/playlist/plugins/SoundCloudPlaylistPlugin.cxx
index 50dc7e4da..a4dcb1972 100644
--- a/src/playlist/plugins/SoundCloudPlaylistPlugin.cxx
+++ b/src/playlist/plugins/SoundCloudPlaylistPlugin.cxx
@@ -238,8 +238,7 @@ try {
bool done = false;
while (!done) {
- char buffer[4096];
- unsigned char *ubuffer = (unsigned char *)buffer;
+ unsigned char buffer[4096];
const size_t nbytes =
input_stream->Read(buffer, sizeof(buffer));
if (nbytes == 0)
@@ -248,10 +247,10 @@ try {
if (done) {
stat = yajl_complete_parse(hand);
} else
- stat = yajl_parse(hand, ubuffer, nbytes);
+ stat = yajl_parse(hand, buffer, nbytes);
if (stat != yajl_status_ok) {
- unsigned char *str = yajl_get_error(hand, 1, ubuffer, nbytes);
+ unsigned char *str = yajl_get_error(hand, 1, buffer, nbytes);
LogError(soundcloud_domain, (const char *)str);
yajl_free_error(hand, str);
break;