Reverse christmas tree and simplify a bit

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2019-04-06 12:45:29 +02:00
1 parent d4096c8c0c
commit 2a709f739d
9 files changed
+23 -23

No files matched your search

+1 -1
View File
@@ -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;
+4 -4
View File
@@ -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;