decoder/Thread: convert "int ret" to "bool success"

This commit is contained in:
Max Kellermann 2015-12-31 13:02:55 +01:00
parent 09157c3130
commit f081696f62

View File

@ -385,11 +385,11 @@ decoder_run_song(DecoderControl &dc,
decoder_command_finished_locked(dc); decoder_command_finished_locked(dc);
int ret; bool success;
{ {
const ScopeUnlock unlock(dc.mutex); const ScopeUnlock unlock(dc.mutex);
ret = !path_fs.IsNull() success = !path_fs.IsNull()
? decoder_run_file(decoder, uri, path_fs) ? decoder_run_file(decoder, uri, path_fs)
: decoder_run_stream(decoder, uri); : decoder_run_stream(decoder, uri);
@ -404,7 +404,7 @@ decoder_run_song(DecoderControl &dc,
DecoderControl */ DecoderControl */
dc.state = DecoderState::ERROR; dc.state = DecoderState::ERROR;
dc.error = std::move(decoder.error); dc.error = std::move(decoder.error);
} else if (ret) } else if (success)
dc.state = DecoderState::STOP; dc.state = DecoderState::STOP;
else { else {
dc.state = DecoderState::ERROR; dc.state = DecoderState::ERROR;