diff options
author | Max Kellermann <max@duempel.org> | 2008-10-08 11:05:02 +0200 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-10-11 19:21:47 -0700 |
commit | 5f15ba96cf5fa641d34d4e98ae8e0972fa6fef0c (patch) | |
tree | d62bd02e6dee9606fa5a49b96b03ef53b53ec598 /src | |
parent | 0211656d2d33b343181412938d78263a06b62587 (diff) | |
download | mpd-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 'src')
-rw-r--r-- | src/playlist.c | 6 |
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 |