From c5b524e3762723a200156b79efd58192db320e5b Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 26 Mar 2008 10:37:36 +0000 Subject: eliminated duplicate initialization Local variables which are never read before the first assignment don't need initialization. Saves a few bytes of text. Also don't reset variables which are never read until function return. git-svn-id: https://svn.musicpd.org/mpd/trunk@7199 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/playlist.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/playlist.c') diff --git a/src/playlist.c b/src/playlist.c index 81c3ee687..60ad75627 100644 --- a/src/playlist.c +++ b/src/playlist.c @@ -87,7 +87,7 @@ static void incrPlaylistVersion(void) void playlistVersionChange(void) { - int i = 0; + int i; for (i = 0; i < playlist.length; i++) { playlist.songMod[i] = playlist.version; @@ -664,7 +664,7 @@ int addSongToPlaylist(int fd, Song * song, int *added_id) int swapSongsInPlaylist(int fd, int song1, int song2) { int queuedSong = -1; - int currentSong = -1; + int currentSong; if (song1 < 0 || song1 >= playlist.length) { commandError(fd, ACK_ERROR_NO_EXIST, -- cgit v1.2.3