r3974 - trunk/varnish-cache/bin/varnishd
phk at projects.linpro.no
phk at projects.linpro.no
Sun Mar 22 09:48:45 CET 2009
Author: phk
Date: 2009-03-22 09:48:45 +0100 (Sun, 22 Mar 2009)
New Revision: 3974
Modified:
trunk/varnish-cache/bin/varnishd/cache_waiter_kqueue.c
Log:
Don't trust EV_SET macro to only evaluate its arguments once, at least
on NetBSD this is not the case.
Fixes #474
Modified: trunk/varnish-cache/bin/varnishd/cache_waiter_kqueue.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_waiter_kqueue.c 2009-03-20 19:43:48 UTC (rev 3973)
+++ trunk/varnish-cache/bin/varnishd/cache_waiter_kqueue.c 2009-03-22 08:48:45 UTC (rev 3974)
@@ -159,8 +159,10 @@
assert(kq >= 0);
j = 0;
- EV_SET(&ke[j++], 0, EVFILT_TIMER, EV_ADD, 0, 100, NULL);
- EV_SET(&ke[j++], vca_pipes[0], EVFILT_READ, EV_ADD, 0, 0, vca_pipes);
+ EV_SET(&ke[j], 0, EVFILT_TIMER, EV_ADD, 0, 100, NULL);
+ j++;
+ EV_SET(&ke[j], vca_pipes[0], EVFILT_READ, EV_ADD, 0, 0, vca_pipes);
+ j++;
AZ(kevent(kq, ke, j, NULL, 0, NULL));
nki = 0;
More information about the varnish-commit
mailing list