playlist/SoundCloud: eliminate unnecessary casted variable
This commit is contained in:
parent
907c045f33
commit
d91d5a3ab5
|
@ -238,8 +238,7 @@ try {
|
||||||
bool done = false;
|
bool done = false;
|
||||||
|
|
||||||
while (!done) {
|
while (!done) {
|
||||||
char buffer[4096];
|
unsigned char buffer[4096];
|
||||||
unsigned char *ubuffer = (unsigned char *)buffer;
|
|
||||||
const size_t nbytes =
|
const size_t nbytes =
|
||||||
input_stream->Read(buffer, sizeof(buffer));
|
input_stream->Read(buffer, sizeof(buffer));
|
||||||
if (nbytes == 0)
|
if (nbytes == 0)
|
||||||
|
@ -248,10 +247,10 @@ try {
|
||||||
if (done) {
|
if (done) {
|
||||||
stat = yajl_complete_parse(hand);
|
stat = yajl_complete_parse(hand);
|
||||||
} else
|
} else
|
||||||
stat = yajl_parse(hand, ubuffer, nbytes);
|
stat = yajl_parse(hand, buffer, nbytes);
|
||||||
|
|
||||||
if (stat != yajl_status_ok) {
|
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);
|
LogError(soundcloud_domain, (const char *)str);
|
||||||
yajl_free_error(hand, str);
|
yajl_free_error(hand, str);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue