summaryrefslogtreecommitdiff
path: root/src/daemon/main.c
diff options
context:
space:
mode:
authorWim Taymans <wtaymans@redhat.com>2017-12-18 11:38:30 +0100
committerWim Taymans <wtaymans@redhat.com>2017-12-18 11:38:30 +0100
commit4d6ac373986c670501fa7632462d955a96457e1e (patch)
tree6caced13cb7ed781c4b7ab736af68ba0779154a3 /src/daemon/main.c
parente5e360d5df0e4ac029d058ec6f80120fdd368d9e (diff)
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.
Diffstat (limited to 'src/daemon/main.c')
-rw-r--r--src/daemon/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/daemon/main.c b/src/daemon/main.c
index fb67319c..a7fae1a5 100644
--- a/src/daemon/main.c
+++ b/src/daemon/main.c
@@ -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;
}