From: Fredrik Tolf Date: Wed, 18 May 2016 03:22:18 +0000 (+0200) Subject: lib: Fixed mblock bug for epoll. X-Git-Url: http://git.dolda2000.com/gitweb/?a=commitdiff_plain;h=4f5bec8434914ecbef54f2e237d46ba4ed73d5ab;p=ashd.git lib: Fixed mblock bug for epoll. --- diff --git a/lib/mtio-epoll.c b/lib/mtio-epoll.c index d9e794e..af7cd27 100644 --- a/lib/mtio-epoll.c +++ b/lib/mtio-epoll.c @@ -166,7 +166,7 @@ struct selected mblock(time_t to, int n, struct selected *spec) .th = current, }; if(addblock(&bls[i])) { - for(i--; i >= 0; i++) + for(i--; i >= 0; i--) remblock(&bls[i]); return((struct selected){.fd = -1, .ev = -1}); }