diff --git a/src/ev_poll.c b/src/ev_poll.c index f9e445113..610509bd6 100644 --- a/src/ev_poll.c +++ b/src/ev_poll.c @@ -205,7 +205,7 @@ REGPRM1 static int _do_init(struct poller *p) int fd_evts_bytes; p->private = NULL; - fd_evts_bytes = (global.maxsock + sizeof(**fd_evts) - 1) / sizeof(**fd_evts) * sizeof(**fd_evts); + fd_evts_bytes = (global.maxsock + sizeof(**fd_evts) * 8 - 1) / (sizeof(**fd_evts) * 8) * sizeof(**fd_evts); if ((fd_evts[DIR_RD] = calloc(1, fd_evts_bytes)) == NULL) goto fail_srevt;