make the bool config parser actually parse bools

git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2007 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
Lennart Poettering 2007-11-01 00:31:59 +00:00
parent cecd8d4d7b
commit b343497d64

View file

@ -169,7 +169,8 @@ int pa_config_parse_int(const char *filename, unsigned line, const char *lvalue,
}
int pa_config_parse_bool(const char *filename, unsigned line, const char *lvalue, const char *rvalue, void *data, PA_GCC_UNUSED void *userdata) {
int *b = data, k;
int k;
pa_bool_t *b = data;
pa_assert(filename);
pa_assert(lvalue);
@ -181,7 +182,7 @@ int pa_config_parse_bool(const char *filename, unsigned line, const char *lvalue
return -1;
}
*b = k;
*b = !!k;
return 0;
}