From 062501e5d3bea2989557fa84325fc894784da16b Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Thu, 24 Jan 2013 01:25:25 +0100 Subject: CLEANUP: http: remove a useless null check srv cannot be null in perform_http_redirect(), as it's taken from the stream interface's target which is always valid for a server-based redirect, and it was already dereferenced above, so in practice, gcc already removes the test anyway. Reported-by: Dinko Korunic (cherry picked from commit 4521ba689c506ce66e4843c887fbc555d2ea2006) --- src/proto_http.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/src/proto_http.c b/src/proto_http.c index ffa2224..06b3743 100644 --- a/src/proto_http.c +++ b/src/proto_http.c @@ -798,8 +798,7 @@ void perform_http_redirect(struct session *s, struct stream_interface *si) http_server_error(s, si, SN_ERR_PRXCOND, SN_FINST_C, 302, &rdr); /* FIXME: we should increase a counter of redirects per server and per backend. */ - if (s->srv) - srv_inc_sess_ctr(s->srv); + srv_inc_sess_ctr(s->srv); } /* Return the error message corresponding to si->err_type. It is assumed -- 1.7.1