r587 - trunk/varnish-cache/bin/varnishd
phk at projects.linpro.no
phk at projects.linpro.no
Tue Aug 1 17:08:36 CEST 2006
Author: phk
Date: 2006-08-01 17:08:36 +0200 (Tue, 01 Aug 2006)
New Revision: 587
Modified:
trunk/varnish-cache/bin/varnishd/hash_classic.c
Log:
Fixx off by one error.
Modified: trunk/varnish-cache/bin/varnishd/hash_classic.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/hash_classic.c 2006-08-01 14:53:29 UTC (rev 586)
+++ trunk/varnish-cache/bin/varnishd/hash_classic.c 2006-08-01 15:08:36 UTC (rev 587)
@@ -176,7 +176,8 @@
CAST_OBJ_NOTNULL(he, oh->hashpriv, HCL_ENTRY_MAGIC);
mtx = he->mtx;
AZ(pthread_mutex_lock(&hcl_mutex[mtx]));
- if (--he->refcnt >= 0) {
+ assert(he->refcnt > 0);
+ if (--he->refcnt > 0) {
AZ(pthread_mutex_unlock(&hcl_mutex[mtx]));
return (1);
}
More information about the varnish-commit
mailing list