]> err.no Git - varnish/commitdiff
Use CHECK_OBJ_ORNULL() macro
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sun, 23 Sep 2007 12:46:19 +0000 (12:46 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sun, 23 Sep 2007 12:46:19 +0000 (12:46 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1982 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_pool.c

index 22e2a8465d64f33b8706f203ce9d8f4cfcb1cd3d..15c35e1a7f35f46fc076060f409fdca1e455823b 100644 (file)
@@ -186,17 +186,13 @@ wrk_do_one(struct worker *w)
        wrq = w->wrq;
        CHECK_OBJ_NOTNULL(wrq->sess, SESS_MAGIC);
        wrq->sess->wrk = w;
-       if (w->nobj != NULL)
-               CHECK_OBJ(w->nobj, OBJECT_MAGIC);
-       if (w->nobjhead != NULL)
-               CHECK_OBJ(w->nobjhead, OBJHEAD_MAGIC);
+       CHECK_OBJ_ORNULL(w->nobj, OBJECT_MAGIC);
+       CHECK_OBJ_ORNULL(w->nobjhead, OBJHEAD_MAGIC);
        w->used = NAN;
        CNT_Session(wrq->sess);
        assert(!isnan(w->used));
-       if (w->nobj != NULL)
-               CHECK_OBJ(w->nobj, OBJECT_MAGIC);
-       if (w->nobjhead != NULL)
-               CHECK_OBJ(w->nobjhead, OBJHEAD_MAGIC);
+       CHECK_OBJ_ORNULL(w->nobj, OBJECT_MAGIC);
+       CHECK_OBJ_ORNULL(w->nobjhead, OBJHEAD_MAGIC);
        w->wrq = NULL;
 }