Commit bd71d3ea authored by Max Kellermann's avatar Max Kellermann

playlist: return early from shufflePlaylist()

Remove one indent level by returning diretly after the check. This makes the function more readable.
parent 00541f8c
...@@ -997,7 +997,9 @@ void shufflePlaylist(void) ...@@ -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();
...@@ -1023,7 +1025,6 @@ void shufflePlaylist(void) ...@@ -1023,7 +1025,6 @@ void shufflePlaylist(void)
queue_length(&playlist.queue)); queue_length(&playlist.queue));
incrPlaylistVersion(); incrPlaylistVersion();
}
} }
enum playlist_result savePlaylist(const char *utf8file) enum playlist_result savePlaylist(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