CLEANUP: frontend: remove one useless local variable
"p" was a copy of sess->fe which itself is also used. It's used in a
few cases, let's remove it and reduce the code as well.
diff --git a/src/stream.c b/src/stream.c
index b28dff7..dca1c88 100644
--- a/src/stream.c
+++ b/src/stream.c
@@ -66,7 +66,6 @@
{
struct stream *s;
struct listener *l = sess->listener;
- struct proxy *p = sess->fe;
struct connection *conn = objt_conn(sess->origin);
struct appctx *appctx = objt_appctx(sess->origin);
int i;
@@ -81,7 +80,7 @@
* - stick-entry tracking
*/
s->flags = 0;
- s->logs.logwait = p->to_log;
+ s->logs.logwait = sess->fe->to_log;
s->logs.level = 0;
s->logs.accept_date = sess->accept_date; /* user-visible date for logging */
s->logs.tv_accept = sess->tv_accept; /* corrected date for internal use */
@@ -137,7 +136,7 @@
s->res_cap = NULL;
/* Let's count a stream now */
- proxy_inc_fe_sess_ctr(l, p);
+ proxy_inc_fe_sess_ctr(l, sess->fe);
for (i = 0; i < MAX_SESS_STKCTR; i++) {
void *ptr;
@@ -227,7 +226,7 @@
else if (appctx)
s->si[0].flags |= SI_FL_WAIT_DATA;
- if (p->accept && p->accept(s) < 0)
+ if (sess->fe->accept && sess->fe->accept(s) < 0)
goto out_fail_accept;
if (conn) {