From 62d4fa9306fdb5dd0a1b592fd8dbdf1b679d92ca Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 30 Oct 2008 08:38:54 +0100 Subject: decoder: use bool for return values and flags Don't return 0/-1 on success/error, but true/false. Instead of int, use bool for storing flags. --- src/player_thread.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/player_thread.c') diff --git a/src/player_thread.c b/src/player_thread.c index 48702b6a3..0c2407eac 100644 --- a/src/player_thread.c +++ b/src/player_thread.c @@ -105,10 +105,10 @@ static int waitOnDecode(struct player *player) return 0; } -static int decodeSeek(struct player *player) +static bool decodeSeek(struct player *player) { - int ret = -1; double where; + bool ret; if (decoder_current_song() != pc.next_song) { dc_stop(&pc.notify); @@ -125,7 +125,7 @@ static int decodeSeek(struct player *player) where = 0.0; ret = dc_seek(&pc.notify, where); - if (ret == 0) + if (ret) pc.elapsedTime = where; player_command_finished(); @@ -173,7 +173,7 @@ static void processDecodeInput(struct player *player) case PLAYER_COMMAND_SEEK: dropBufferedAudio(); - if (decodeSeek(player) == 0) { + if (decodeSeek(player)) { player->xfade = XFADE_UNKNOWN; /* abort buffering when the user has requested -- cgit v1.2.3