mirror of
https://github.com/troglobit/libuev.git
synced 2026-10-18 10:39:31 +00:00
Reverse christmas tree and simplify a bit
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
d4096c8c0c
commit
2a709f739d
9 files changed
+23
-23
No files matched your search
+1
-1
@@ -42,8 +42,8 @@
|
||||
*/
|
||||
int uev_signal_init(uev_ctx_t *ctx, uev_t *w, uev_cb_t *cb, void *arg, int signo)
|
||||
{
|
||||
int fd;
|
||||
sigset_t mask;
|
||||
int fd;
|
||||
|
||||
if (!w || !ctx) {
|
||||
errno = EINVAL;
|
||||
|
||||
@@ -289,8 +289,8 @@ int uev_exit(uev_ctx_t *ctx)
|
||||
*/
|
||||
int uev_run(uev_ctx_t *ctx, int flags)
|
||||
{
|
||||
int timeout = -1;
|
||||
uev_t *w;
|
||||
int timeout = -1;
|
||||
|
||||
if (!ctx || ctx->fd < 0) {
|
||||
errno = EINVAL;
|
||||
@@ -312,8 +312,8 @@ int uev_run(uev_ctx_t *ctx, int flags)
|
||||
}
|
||||
|
||||
while (ctx->running && ctx->watchers) {
|
||||
int i, nfds, rerun = 0;
|
||||
struct epoll_event ee[UEV_MAX_EVENTS];
|
||||
int i, nfds, rerun = 0;
|
||||
|
||||
/* Handle special case: `application < file.txt` */
|
||||
if (ctx->workaround) {
|
||||
@@ -349,9 +349,9 @@ int uev_run(uev_ctx_t *ctx, int flags)
|
||||
}
|
||||
|
||||
for (i = 0; ctx->running && i < nfds; i++) {
|
||||
uint64_t exp;
|
||||
uint32_t events;
|
||||
struct signalfd_siginfo fdsi;
|
||||
uint32_t events;
|
||||
uint64_t exp;
|
||||
ssize_t sz = sizeof(fdsi);
|
||||
|
||||
w = (uev_t *)ee[i].data.ptr;
|
||||
|
||||
Reference in new issue
Block a user