playlist: return early from shufflePlaylist()

Remove one indent level by returning diretly after the check.  This
makes the function more readable.
This commit is contained in:
Max Kellermann 2009-01-23 00:09:29 +01:00
parent 00541f8ce9
commit bd71d3ea78

View File

@ -997,7 +997,9 @@ void shufflePlaylist(void)
{ {
unsigned i; unsigned i;
if (queue_length(&playlist.queue) > 1) { if (queue_length(&playlist.queue) <= 1)
return;
if (playlist.playing) { if (playlist.playing) {
if (playlist.queued >= 0) if (playlist.queued >= 0)
clearPlayerQueue(); clearPlayerQueue();
@ -1024,7 +1026,6 @@ void shufflePlaylist(void)
incrPlaylistVersion(); incrPlaylistVersion();
} }
}
enum playlist_result savePlaylist(const char *utf8file) enum playlist_result savePlaylist(const char *utf8file)
{ {