aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-08-26 08:44:33 +0200
committerMax Kellermann <max@duempel.org>2008-08-26 08:44:33 +0200
commitbf4af19f54d53d23023177222a79ee83b9fde87a (patch)
treeebd3aa9a8916dea9227ef6e44e746cd8593bdd84 /src
parenta2b24462e8c6517cbfb0eb9e5632d00ce3dd4ee3 (diff)
downloadmpd-bf4af19f54d53d23023177222a79ee83b9fde87a.tar.gz
mpd-bf4af19f54d53d23023177222a79ee83b9fde87a.tar.xz
mpd-bf4af19f54d53d23023177222a79ee83b9fde87a.zip
don't initialize "i" if we overwrite it anyway
Diffstat (limited to '')
-rw-r--r--src/playlist.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/playlist.c b/src/playlist.c
index 31180e4e7..8ffd56684 100644
--- a/src/playlist.c
+++ b/src/playlist.c
@@ -1354,7 +1354,7 @@ int getPlaylistLength(void)
int seekSongInPlaylist(int fd, int song, float seek_time)
{
- int i = song;
+ int i;
if (song < 0 || song >= playlist.length) {
commandError(fd, ACK_ERROR_NO_EXIST,
@@ -1364,6 +1364,8 @@ int seekSongInPlaylist(int fd, int song, float seek_time)
if (playlist.random)
for (i = 0; song != playlist.order[i]; i++) ;
+ else
+ i = song;
clearPlayerError();
playlist_stopOnError = 1;