aboutsummaryrefslogtreecommitdiffstats
path: root/src/playlist.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-23 06:28:46 +0100
committerMax Kellermann <max@duempel.org>2009-01-23 11:32:07 +0100
commit5d31e7e7d2d524279fe2ae857901ceb73ff6e7b2 (patch)
tree0251115137047b8e64c57caa3437284287943767 /src/playlist.c
parente5c323fd57808826613ad889e1cbd1c34590b633 (diff)
downloadmpd-5d31e7e7d2d524279fe2ae857901ceb73ff6e7b2.tar.gz
mpd-5d31e7e7d2d524279fe2ae857901ceb73ff6e7b2.tar.xz
mpd-5d31e7e7d2d524279fe2ae857901ceb73ff6e7b2.zip
playlist: removed unreachable "playing" check
In playPlaylist(), the second "song==-1 && playing" check can never be reached, because at this point, the function has already returned (after unpausing).
Diffstat (limited to '')
-rw-r--r--src/playlist.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/playlist.c b/src/playlist.c
index 9e44add67..6fb0e9227 100644
--- a/src/playlist.c
+++ b/src/playlist.c
@@ -703,19 +703,15 @@ enum playlist_result playPlaylist(int song)
return PLAYLIST_RESULT_BAD_RANGE;
if (playlist.queue.random) {
- if (song == -1 && playlist.playing) {
- queue_shuffle_order(&playlist.queue);
- } else {
- if (song >= 0)
- i = queue_position_to_order(&playlist.queue, song);
+ if (song >= 0)
+ i = queue_position_to_order(&playlist.queue, song);
- if (!playlist.playing)
- playlist.current = 0;
+ if (!playlist.playing)
+ playlist.current = 0;
- queue_swap_order(&playlist.queue,
- i, playlist.current);
- i = playlist.current;
- }
+ queue_swap_order(&playlist.queue,
+ i, playlist.current);
+ i = playlist.current;
}
playlist_stopOnError = false;