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:
parent
2a7d99702f
commit
285a741b27
@ -121,6 +121,7 @@ void initPlaylist(void)
|
|||||||
{
|
{
|
||||||
char *test;
|
char *test;
|
||||||
ConfigParam *param;
|
ConfigParam *param;
|
||||||
|
int value;
|
||||||
|
|
||||||
g_rand = g_rand_new();
|
g_rand = g_rand_new();
|
||||||
|
|
||||||
@ -140,9 +141,10 @@ void initPlaylist(void)
|
|||||||
"line %i", param->value, param->line);
|
"line %i", param->value, param->line);
|
||||||
}
|
}
|
||||||
|
|
||||||
playlist_saveAbsolutePaths = getBoolConfigParam(
|
value = getBoolConfigParam(CONF_SAVE_ABSOLUTE_PATHS, 1);
|
||||||
CONF_SAVE_ABSOLUTE_PATHS, 1);
|
if (value != CONF_BOOL_UNSET)
|
||||||
if (playlist_saveAbsolutePaths == CONF_BOOL_UNSET)
|
playlist_saveAbsolutePaths = value;
|
||||||
|
else
|
||||||
playlist_saveAbsolutePaths =
|
playlist_saveAbsolutePaths =
|
||||||
DEFAULT_PLAYLIST_SAVE_ABSOLUTE_PATHS;
|
DEFAULT_PLAYLIST_SAVE_ABSOLUTE_PATHS;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user