mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2026-05-05 00:48:02 +02:00
util: fix clobbered errno in sink_add_source
This commit is contained in:
parent
381c6bea1f
commit
8f6c355805
1 changed files with 3 additions and 2 deletions
|
|
@ -197,9 +197,10 @@ sink_add_source(struct sink *sink, struct source *source)
|
|||
.data.ptr = source_ref(source),
|
||||
};
|
||||
|
||||
if (epoll_ctl(sink->epollfd, EPOLL_CTL_ADD, source_get_fd(source), &e) < 0) {
|
||||
int rc = xerrno(epoll_ctl(sink->epollfd, EPOLL_CTL_ADD, source_get_fd(source), &e));
|
||||
if (rc < 0) {
|
||||
source_unref(source);
|
||||
return -errno;
|
||||
return rc;
|
||||
}
|
||||
|
||||
source->is_active = true;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue