aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-16 16:04:20 +0100
committerMax Kellermann <max@duempel.org>2009-01-16 17:11:18 +0100
commit285a741b27a98dadaeb970c1f022c810245749f1 (patch)
tree1a7c4e61ba22b75ebad63089e6a84ddaccd4b314
parent2a7d99702fd99a00c9f87177d79e8fea23177232 (diff)
downloadmpd-285a741b27a98dadaeb970c1f022c810245749f1.tar.gz
mpd-285a741b27a98dadaeb970c1f022c810245749f1.tar.xz
mpd-285a741b27a98dadaeb970c1f022c810245749f1.zip
playlist: don't store getBoolConfigParam() in a bool
getBoolConfigParam() returns an int. It is not possible to check for CONF_BOOL_UNSET after it has been assigned to a bool; use a temporary int value for that.
-rw-r--r--src/playlist.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/playlist.c b/src/playlist.c
index bc01700aa..183676854 100644
--- a/src/playlist.c
+++ b/src/playlist.c
@@ -121,6 +121,7 @@ void initPlaylist(void)
{
char *test;
ConfigParam *param;
+ int value;
g_rand = g_rand_new();
@@ -140,9 +141,10 @@ void initPlaylist(void)
"line %i", param->value, param->line);
}
- playlist_saveAbsolutePaths = getBoolConfigParam(
- CONF_SAVE_ABSOLUTE_PATHS, 1);
- if (playlist_saveAbsolutePaths == CONF_BOOL_UNSET)
+ value = getBoolConfigParam(CONF_SAVE_ABSOLUTE_PATHS, 1);
+ if (value != CONF_BOOL_UNSET)
+ playlist_saveAbsolutePaths = value;
+ else
playlist_saveAbsolutePaths =
DEFAULT_PLAYLIST_SAVE_ABSOLUTE_PATHS;