X-Git-Url: http://www.dolda2000.com/gitweb/?p=ashd.git;a=blobdiff_plain;f=lib%2Fmtio-kqueue.c;fp=lib%2Fmtio-kqueue.c;h=7d086e2243867e865f23912e41fe6f0864c3021c;hp=b4e7427b1e793aeb1fd7b6e26647dff54bd47830;hb=6f7dbebc025e1731bb09c517bd86b9b1a5679230;hpb=f73d86248993df0db829675f691d92832de95646 diff --git a/lib/mtio-kqueue.c b/lib/mtio-kqueue.c index b4e7427..7d086e2 100644 --- a/lib/mtio-kqueue.c +++ b/lib/mtio-kqueue.c @@ -287,12 +287,13 @@ int ioloop(void) } while(blockers != NULL) { now = time(NULL); + toval = &(struct timespec){}; if(timeheap.d == 0) toval = NULL; else if(timeheap.b[0]->to > now) - toval = &(struct timespec){.tv_sec = timeheap.b[0]->to - now}; + *toval = (struct timespec){.tv_sec = timeheap.b[0]->to - now}; else - toval = &(struct timespec){.tv_sec = 1}; + *toval = (struct timespec){.tv_sec = 1}; if(exitstatus) break; nev = kevent(qfd, NULL, 0, evs, sizeof(evs) / sizeof(*evs), toval);