From 285a741b27a98dadaeb970c1f022c810245749f1 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 16 Jan 2009 16:04:20 +0100 Subject: [PATCH] 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. --- src/playlist.c | 8 +++++--- 1 file 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;