[master] 2725865 Minor cosmetics
Federico G. Schwindt
fgsch at lodoss.net
Tue Mar 8 19:54:14 CET 2016
commit 27258654827e8c94bf4928c8dfcb07e9b9dbf566
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date: Tue Mar 8 18:44:16 2016 +0000
Minor cosmetics
diff --git a/bin/varnishd/cache/cache_backend_tcp.c b/bin/varnishd/cache/cache_backend_tcp.c
index 1a3ca73..b43bf3c 100644
--- a/bin/varnishd/cache/cache_backend_tcp.c
+++ b/bin/varnishd/cache/cache_backend_tcp.c
@@ -231,7 +231,7 @@ 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);
@@ -239,7 +239,7 @@ VBT_Open(const struct tcp_pool *tp, double tmo, const struct suckaddr **sa)
*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);
More information about the varnish-commit
mailing list