mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-19 08:57:14 -05:00
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:
parent
e5e360d5df
commit
4d6ac37398
38 changed files with 308 additions and 297 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue