diff options
author | Max Kellermann <max@duempel.org> | 2008-09-07 13:39:19 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-09-07 13:39:19 +0200 |
commit | 20feb0cbbab3c1516f0309a87c3d27f9801c7938 (patch) | |
tree | 8dbfb88a60c022d877edc1f2e677e7a147f4fa30 | |
parent | e1bf96672e8ef46b4ed20eba2c91efa048c4789c (diff) | |
download | mpd-20feb0cbbab3c1516f0309a87c3d27f9801c7938.tar.gz mpd-20feb0cbbab3c1516f0309a87c3d27f9801c7938.tar.xz mpd-20feb0cbbab3c1516f0309a87c3d27f9801c7938.zip |
playlist: showPlaylist() and shufflePlaylist() cannot fail
Make them both return void.
-rw-r--r-- | src/command.c | 6 | ||||
-rw-r--r-- | src/playlist.c | 8 | ||||
-rw-r--r-- | src/playlist.h | 4 |
3 files changed, 8 insertions, 10 deletions
diff --git a/src/command.c b/src/command.c index 63ff03e96..9015a3881 100644 --- a/src/command.c +++ b/src/command.c @@ -437,13 +437,15 @@ static int handleDeleteId(int fd, mpd_unused int *permission, static int handlePlaylist(int fd, mpd_unused int *permission, mpd_unused int argc, mpd_unused char *argv[]) { - return showPlaylist(fd); + showPlaylist(fd); + return 0; } static int handleShuffle(int fd, mpd_unused int *permission, mpd_unused int argc, mpd_unused char *argv[]) { - return shufflePlaylist(fd); + shufflePlaylist(fd); + return 0; } static int handleClear(mpd_unused int fd, mpd_unused int *permission, diff --git a/src/playlist.c b/src/playlist.c index 06df43fc3..193989bdb 100644 --- a/src/playlist.c +++ b/src/playlist.c @@ -217,7 +217,7 @@ int clearStoredPlaylist(int fd, const char *utf8file) return removeAllFromStoredPlaylistByPath(fd, utf8file); } -int showPlaylist(int fd) +void showPlaylist(int fd) { int i; char path_max_tmp[MPD_PATH_MAX]; @@ -226,8 +226,6 @@ int showPlaylist(int fd) fdprintf(fd, "%i:%s\n", i, get_song_url(path_max_tmp, playlist.songs[i])); } - - return 0; } void savePlaylistState(FILE *fp) @@ -1224,7 +1222,7 @@ void previousSongInPlaylist(void) } } -int shufflePlaylist(mpd_unused int fd) +void shufflePlaylist(mpd_unused int fd) { int i; int ri; @@ -1253,8 +1251,6 @@ int shufflePlaylist(mpd_unused int fd) incrPlaylistVersion(); } - - return 0; } int deletePlaylist(int fd, const char *utf8file) diff --git a/src/playlist.h b/src/playlist.h index 9ef91e3e0..ff05dca24 100644 --- a/src/playlist.h +++ b/src/playlist.h @@ -61,7 +61,7 @@ int addToStoredPlaylist(int fd, const char *file, const char *utf8file); int addSongToPlaylist(int fd, Song * song, int *added_id); -int showPlaylist(int fd); +void showPlaylist(int fd); int deleteFromPlaylist(int fd, int song); @@ -83,7 +83,7 @@ void syncPlayerAndPlaylist(void); void previousSongInPlaylist(void); -int shufflePlaylist(int fd); +void shufflePlaylist(int fd); int savePlaylist(int fd, const char *utf8file); |