mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-21 08:56:56 -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
|
|
@ -473,12 +473,10 @@ static int impl_steal_fd(struct pw_protocol_client *client)
|
|||
return -EIO;
|
||||
|
||||
fd = dup(impl->source->fd);
|
||||
if (fd == -1) {
|
||||
fd = -errno;
|
||||
goto out;
|
||||
}
|
||||
if (fd < 0)
|
||||
return -errno;
|
||||
|
||||
pw_protocol_client_disconnect(client);
|
||||
out:
|
||||
return fd;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue