mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-02-05 01:40:29 +01:00
libinput_dispatch: return negative error number on failure
Might as well tell the caller what went wrong without having to worry about errno. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
2aec703c2e
commit
f583cb7f6c
1 changed files with 2 additions and 1 deletions
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
|
@ -212,7 +213,7 @@ libinput_dispatch(struct libinput *libinput)
|
|||
|
||||
count = epoll_wait(libinput->epoll_fd, ep, ARRAY_LENGTH(ep), 0);
|
||||
if (count < 0)
|
||||
return -1;
|
||||
return -errno;
|
||||
|
||||
for (i = 0; i < count; ++i) {
|
||||
source = ep[i].data.ptr;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue