aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-04-12 04:12:07 +0000
committerEric Wong <normalperson@yhbt.net>2008-04-12 04:12:07 +0000
commite63f388b046a9cc71e3353581b1f34d9975b3ba0 (patch)
tree998a18d64d770c43262038c69b42819af4221e03 /src
parentf6ed3eaeae593c65e577ef77822c2f60fe2af7a7 (diff)
downloadmpd-e63f388b046a9cc71e3353581b1f34d9975b3ba0.tar.gz
mpd-e63f388b046a9cc71e3353581b1f34d9975b3ba0.tar.xz
mpd-e63f388b046a9cc71e3353581b1f34d9975b3ba0.zip
use DECODE_ERROR_NOERROR instead of 0
In my opinion, the code becomes more readable when we explicitly check "==NOERROR" instead of an implicit 0 check. git-svn-id: https://svn.musicpd.org/mpd/trunk@7255 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/decode.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/decode.c b/src/decode.c
index 6c0b9bfff..98bcae6a5 100644
--- a/src/decode.c
+++ b/src/decode.c
@@ -167,13 +167,13 @@ static int decodeSeek(PlayerControl * pc, DecoderControl * dc,
int ret = -1;
if (dc->state == DECODE_STATE_STOP ||
- dc->error ||
+ dc->error != DECODE_ERROR_NOERROR ||
dc->current_song != pc->current_song) {
stopDecode(dc);
*next = -1;
cb->begin = 0;
cb->end = 0;
- dc->error = 0;
+ dc->error = DECODE_ERROR_NOERROR;
dc->start = 1;
waitOnDecode(pc, dc, cb, decodeWaitedOn);
}
@@ -612,7 +612,7 @@ void decode(void)
cb->end = 0;
pc = &(getPlayerData()->playerControl);
dc = &(getPlayerData()->decoderControl);
- dc->error = 0;
+ dc->error = DECODE_ERROR_NOERROR;
dc->seek = 0;
dc->stop = 0;
dc->start = 1;