Use int instead of bool as result

Prefer to use an int return from a function instead of bool because
it can contain more info about failures.
This commit is contained in:
Wim Taymans 2017-12-18 11:38:30 +01:00
parent e5e360d5df
commit 4d6ac37398
38 changed files with 308 additions and 297 deletions

View file

@ -43,7 +43,7 @@ int main(int argc, char *argv[])
/* parse configuration */
config = pw_daemon_config_new();
if (!pw_daemon_config_load(config, &err)) {
if (pw_daemon_config_load(config, &err) < 0) {
pw_log_error("failed to parse config: %s", err);
free(err);
return -1;
@ -58,7 +58,7 @@ int main(int argc, char *argv[])
core = pw_core_new(pw_main_loop_get_loop(loop), props);
if (!pw_daemon_config_run_commands(config, core)) {
if (pw_daemon_config_run_commands(config, core) < 0) {
pw_log_error("failed to run config commands");
return -1;
}