Skip to content

Commit

Permalink
cache_backend: Always initialize timeout vars (flexlint)
Browse files Browse the repository at this point in the history
  • Loading branch information
walid-git committed Feb 29, 2024
1 parent 54090b5 commit 9986084
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/varnishd/cache/cache_backend.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,10 @@ vbe_dir_getfd(VRT_CTX, struct worker *wrk, VCL_BACKEND dir, struct backend *bp,
INIT_OBJ(cw, CONNWAIT_MAGIC);
PTOK(pthread_cond_init(&cw->cw_cond, NULL));
Lck_Lock(bp->director->mtx);
FIND_BE_PARAM(backend_wait_limit, wait_limit, bp);
FIND_BE_PARAM(backend_wait_timeout, wait_tmod, bp);
cw->cw_state = CW_DO_CONNECT;
if (!VTAILQ_EMPTY(&bp->cw_head) || BE_BUSY(bp)) {
FIND_BE_PARAM(backend_wait_limit, wait_limit, bp);
FIND_BE_PARAM(backend_wait_timeout, wait_tmod, bp);
cw->cw_state = CW_BE_BUSY;
}

Expand Down

0 comments on commit 9986084

Please sign in to comment.