Permalink
Browse files

Minor cosmetics

  • Loading branch information...
1 parent e4e4e21 commit 27258654827e8c94bf4928c8dfcb07e9b9dbf566 @fgsch fgsch committed Mar 8, 2016
Showing with 4 additions and 5 deletions.
  1. +4 −5 bin/varnishd/cache/cache_backend_tcp.c
@@ -231,15 +231,15 @@ VBT_Open(const struct tcp_pool *tp, double tmo, const struct suckaddr **sa)
*sa = tp->ip6;
s = VTCP_connect(tp->ip6, msec);
if (s >= 0)
- return(s);
+ return (s);
}
*sa = tp->ip4;
s = VTCP_connect(tp->ip4, msec);
if (s < 0 && !cache_param->prefer_ipv6) {
*sa = tp->ip6;
s = VTCP_connect(tp->ip6, msec);
}
- return(s);
+ return (s);
}
/*--------------------------------------------------------------------
@@ -360,7 +360,7 @@ VBT_Get(struct tcp_pool *tp, double tmo, const struct backend *be,
VTAILQ_REMOVE(&tp->connlist, vbc, list);
VTAILQ_INSERT_TAIL(&tp->connlist, vbc, list);
tp->n_conn--;
- VSC_C_main->backend_reuse += 1;
+ VSC_C_main->backend_reuse++;
vbc->state = VBC_STATE_STOLEN;
vbc->cond = &wrk->cond;
}
@@ -376,9 +376,8 @@ VBT_Get(struct tcp_pool *tp, double tmo, const struct backend *be,
vbc->state = VBC_STATE_USED;
vbc->tcp_pool = tp;
vbc->fd = VBT_Open(tp, tmo, &vbc->addr);
- if (vbc->fd < 0)
+ if (vbc->fd < 0) {
FREE_OBJ(vbc);
- if (vbc == NULL) {
Lck_Lock(&tp->mtx);
tp->n_used--; // Nope, didn't work after all.
Lck_Unlock(&tp->mtx);

0 comments on commit 2725865

Please sign in to comment.