[master] c3bd169 Silence a Coverity non-defect
Dridi Boukelmoune
dridi at varni.sh
Thu May 24 08:22:08 UTC 2018
On Thu, May 24, 2018 at 10:09 AM, Dag Haavi Finstad
<daghf at varnish-software.com> wrote:
>
> commit c3bd1693c7265fef6fc2dc0f9f1b07b1a18f2e0d
> Author: Dag Haavi Finstad <daghf at varnish-software.com>
> Date: Thu May 24 10:06:34 2018 +0200
>
> Silence a Coverity non-defect
>
> diff --git a/bin/varnishd/cache/cache_panic.c b/bin/varnishd/cache/cache_panic.c
> index 0666c89..cf22c0e 100644
> --- a/bin/varnishd/cache/cache_panic.c
> +++ b/bin/varnishd/cache/cache_panic.c
> @@ -401,6 +401,7 @@ pan_busyobj(struct vsb *vsb, const struct busyobj *bo)
> VSB_indent(vsb, 2);
> PAN_CheckMagic(vsb, bo, BUSYOBJ_MAGIC);
> pan_ws(vsb, bo->ws);
> + AN(bo->vfc);
Is it safe to put an assert here? Shouldn't we guard accesses to
bo->vfc if Nils thought it could be NULL?
> VSB_printf(vsb, "retries = %d, ", bo->retries);
> VSB_printf(vsb, "failed = %d, ", bo->vfc->failed);
> VSB_printf(vsb, "flags = {");
> @@ -415,8 +416,7 @@ pan_busyobj(struct vsb *vsb, const struct busyobj *bo)
> if (VALID_OBJ(bo->htc, HTTP_CONN_MAGIC))
> pan_htc(vsb, bo->htc);
>
> - if (bo->vfc)
> - pan_vfp(vsb, bo->vfc);
> + pan_vfp(vsb, bo->vfc);
>
> VDI_Panic(bo->director_req, vsb, "director_req");
> if (bo->director_resp == bo->director_req)
> _______________________________________________
> 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