mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -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
|
|
@ -74,7 +74,7 @@ struct impl {
|
|||
*
|
||||
* \param conn the connection
|
||||
* \param index the index of the fd to get
|
||||
* \return the fd at \a index or -1 when no such fd exists
|
||||
* \return the fd at \a index or -ENOENT when no such fd exists
|
||||
*
|
||||
* \memberof pw_protocol_native_connection
|
||||
*/
|
||||
|
|
@ -84,7 +84,7 @@ int pw_protocol_native_connection_get_fd(struct pw_protocol_native_connection *c
|
|||
struct buffer *buf = &impl->in;
|
||||
|
||||
if (index >= buf->msg.n_fds)
|
||||
return -1;
|
||||
return -ENOENT;
|
||||
|
||||
return buf->msg.fds[index];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue