[master] 9804794a0 side effect of staring at code not worth a ticket

Dridi Boukelmoune dridi at varni.sh
Mon Sep 3 16:20:08 UTC 2018


On Mon, Sep 3, 2018 at 6:16 PM, Nils Goroll <nils.goroll at uplex.de> wrote:
>
> commit 9804794a0e876800e4e3ca10e965b568bd37c38e
> Author: Nils Goroll <nils.goroll at uplex.de>
> Date:   Mon Sep 3 18:11:42 2018 +0200
>
>     side effect of staring at code not worth a ticket
>
> diff --git a/bin/varnishd/cache/cache_hash.c b/bin/varnishd/cache/cache_hash.c
> index c3b652bbe..1b63d906d 100644
> --- a/bin/varnishd/cache/cache_hash.c
> +++ b/bin/varnishd/cache/cache_hash.c
> @@ -407,6 +407,8 @@ HSH_Lookup(struct req *req, struct objcore **ocp, struct objcore **bocp,
>                         continue;
>
>                 if (oc->boc != NULL && oc->boc->state < BOS_STREAM) {
> +                       // XXX does it make sense to have the CHECK_OBJ
> +                       //     if we access boc->state before it?
>                         CHECK_OBJ_ORNULL(oc->boc, BOC_MAGIC);

Looks like a simple mistake, it's an ORNULL check so it belongs before
the if statement.

>
>                         if (req->hash_ignore_busy)
> _______________________________________________
> varnish-commit mailing list
> varnish-commit at varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit


More information about the varnish-commit mailing list