Correct return code from setting_get_priority().

The function was returning 1 when filling the destination buffer with
the default value.  It should return 0 when the value is default and 1
when it has been set by the administrator.
master
Iain Patterson 9 years ago
parent 264c99d57e
commit 7085323d70

@ -452,7 +452,9 @@ static int setting_get_priority(const TCHAR *service_name, void *param, const TC
unsigned long constant;
switch (get_number(key, (TCHAR *) name, &constant, false)) {
case 0: return value_from_string(name, value, (const TCHAR *) default_value);
case 0:
if (value_from_string(name, value, (const TCHAR *) default_value) == -1) return -1;
return 0;
case -1: return -1;
}

Loading…
Cancel
Save