]> err.no Git - varnish/commitdiff
Fixx off by one error.
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 1 Aug 2006 15:08:36 +0000 (15:08 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 1 Aug 2006 15:08:36 +0000 (15:08 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@587 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/hash_classic.c

index 32ebe67add14203e98e5a95abc104909cf13b28b..0b0f99c9deb5c71857d726c675933c005e3f33af 100644 (file)
@@ -176,7 +176,8 @@ hcl_deref(struct objhead *oh)
        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);
        }