aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-08 11:05:02 +0200
committerEric Wong <normalperson@yhbt.net>2008-10-11 19:21:47 -0700
commit5f15ba96cf5fa641d34d4e98ae8e0972fa6fef0c (patch)
treed62bd02e6dee9606fa5a49b96b03ef53b53ec598
parent0211656d2d33b343181412938d78263a06b62587 (diff)
downloadmpd-5f15ba96cf5fa641d34d4e98ae8e0972fa6fef0c.tar.gz
mpd-5f15ba96cf5fa641d34d4e98ae8e0972fa6fef0c.tar.xz
mpd-5f15ba96cf5fa641d34d4e98ae8e0972fa6fef0c.zip
playlist: simplified setPlaylistRandomStatus()
Check the old status before assigning. This saves a temporary variable.
Diffstat (limited to '')
-rw-r--r--src/playlist.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/playlist.c b/src/playlist.c
index ea9f5719c..02800c2ba 100644
--- a/src/playlist.c
+++ b/src/playlist.c
@@ -1146,11 +1146,7 @@ static void randomizeOrder(int start, int end)
void setPlaylistRandomStatus(int status)
{
- int statusWas = playlist.random;
-
- playlist.random = status;
-
- if (status != statusWas) {
+ if (status != playlist.random) {
if (playlist.random)
randomizeOrder(0, playlist.length - 1);
else