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.
This commit is contained in:
Max Kellermann 2009-01-16 16:04:20 +01:00
parent 2a7d99702f
commit 285a741b27

View File

@ -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;