mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-08 13:30:08 -05:00
system: make system functions return error on error
Return -errno from system functions instead of -1 in errors. This makes it easier to pass along the result without having to go to errno etc..
This commit is contained in:
parent
03eeb945f3
commit
5b7e95c71c
9 changed files with 154 additions and 157 deletions
|
|
@ -277,7 +277,7 @@ static int client_node_demarshal_transport(void *object, const struct pw_protoco
|
|||
readfd = pw_protocol_native_get_proxy_fd(proxy, ridx);
|
||||
writefd = pw_protocol_native_get_proxy_fd(proxy, widx);
|
||||
|
||||
if (readfd == -1 || writefd == -1)
|
||||
if (readfd < 0 || writefd < 0)
|
||||
return -EINVAL;
|
||||
|
||||
pw_proxy_notify(proxy, struct pw_client_node_proxy_events, transport, 0, node_id,
|
||||
|
|
@ -514,7 +514,7 @@ static int client_node_demarshal_set_activation(void *object, const struct pw_pr
|
|||
return -EINVAL;
|
||||
|
||||
signalfd = pw_protocol_native_get_proxy_fd(proxy, sigidx);
|
||||
if (signalfd == -1)
|
||||
if (signalfd < 0)
|
||||
return -EINVAL;
|
||||
|
||||
pw_proxy_notify(proxy, struct pw_client_node_proxy_events, set_activation, 0,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue