diff --git a/io.c b/io.c index 690d92b..b9ebdf2 100644 --- a/io.c +++ b/io.c @@ -61,10 +61,9 @@ int uev_io_init(uev_ctx_t *ctx, uev_t *w, uev_cb_t *cb, void *arg, int fd, int e int uev_io_set(uev_t *w, int fd, int events) { - if( events & UEV_ONESHOT - && 1 == w->active ) { - return uev_watcher_rearm(w); - } + if( (events & UEV_ONESHOT) && w->active ) { + return uev_watcher_rearm(w); + } /* Ignore any errors, only to clean up anything lingering ... */ uev_io_stop(w); diff --git a/uev.h b/uev.h index bd6ce10..dbfd02f 100644 --- a/uev.h +++ b/uev.h @@ -37,7 +37,7 @@ #define UEV_PRI EPOLLPRI #define UEV_HUP EPOLLHUP #define UEV_RDHUP EPOLLRDHUP -#define UEV_ET EPOLLET +#define UEV_EDGE EPOLLET #define UEV_ONESHOT EPOLLONESHOT /* Run flags */