playlist: showPlaylist() and shufflePlaylist() cannot fail
Make them both return void.
This commit is contained in:
parent
e1bf96672e
commit
20feb0cbba
@ -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,
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user