Commit 20feb0cb authored by Max Kellermann's avatar Max Kellermann

playlist: showPlaylist() and shufflePlaylist() cannot fail

Make them both return void.
parent e1bf9667
...@@ -437,13 +437,15 @@ static int handleDeleteId(int fd, mpd_unused int *permission, ...@@ -437,13 +437,15 @@ static int handleDeleteId(int fd, mpd_unused int *permission,
static int handlePlaylist(int fd, mpd_unused int *permission, static int handlePlaylist(int fd, mpd_unused int *permission,
mpd_unused int argc, mpd_unused char *argv[]) mpd_unused int argc, mpd_unused char *argv[])
{ {
return showPlaylist(fd); showPlaylist(fd);
return 0;
} }
static int handleShuffle(int fd, mpd_unused int *permission, static int handleShuffle(int fd, mpd_unused int *permission,
mpd_unused int argc, mpd_unused char *argv[]) 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, static int handleClear(mpd_unused int fd, mpd_unused int *permission,
......
...@@ -217,7 +217,7 @@ int clearStoredPlaylist(int fd, const char *utf8file) ...@@ -217,7 +217,7 @@ int clearStoredPlaylist(int fd, const char *utf8file)
return removeAllFromStoredPlaylistByPath(fd, utf8file); return removeAllFromStoredPlaylistByPath(fd, utf8file);
} }
int showPlaylist(int fd) void showPlaylist(int fd)
{ {
int i; int i;
char path_max_tmp[MPD_PATH_MAX]; char path_max_tmp[MPD_PATH_MAX];
...@@ -226,8 +226,6 @@ int showPlaylist(int fd) ...@@ -226,8 +226,6 @@ int showPlaylist(int fd)
fdprintf(fd, "%i:%s\n", i, fdprintf(fd, "%i:%s\n", i,
get_song_url(path_max_tmp, playlist.songs[i])); get_song_url(path_max_tmp, playlist.songs[i]));
} }
return 0;
} }
void savePlaylistState(FILE *fp) void savePlaylistState(FILE *fp)
...@@ -1224,7 +1222,7 @@ void previousSongInPlaylist(void) ...@@ -1224,7 +1222,7 @@ void previousSongInPlaylist(void)
} }
} }
int shufflePlaylist(mpd_unused int fd) void shufflePlaylist(mpd_unused int fd)
{ {
int i; int i;
int ri; int ri;
...@@ -1253,8 +1251,6 @@ int shufflePlaylist(mpd_unused int fd) ...@@ -1253,8 +1251,6 @@ int shufflePlaylist(mpd_unused int fd)
incrPlaylistVersion(); incrPlaylistVersion();
} }
return 0;
} }
int deletePlaylist(int fd, const char *utf8file) int deletePlaylist(int fd, const char *utf8file)
......
...@@ -61,7 +61,7 @@ int addToStoredPlaylist(int fd, const char *file, const char *utf8file); ...@@ -61,7 +61,7 @@ int addToStoredPlaylist(int fd, const char *file, const char *utf8file);
int addSongToPlaylist(int fd, Song * song, int *added_id); int addSongToPlaylist(int fd, Song * song, int *added_id);
int showPlaylist(int fd); void showPlaylist(int fd);
int deleteFromPlaylist(int fd, int song); int deleteFromPlaylist(int fd, int song);
...@@ -83,7 +83,7 @@ void syncPlayerAndPlaylist(void); ...@@ -83,7 +83,7 @@ void syncPlayerAndPlaylist(void);
void previousSongInPlaylist(void); void previousSongInPlaylist(void);
int shufflePlaylist(int fd); void shufflePlaylist(int fd);
int savePlaylist(int fd, const char *utf8file); int savePlaylist(int fd, const char *utf8file);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment