mirror of
https://github.com/haproxy/haproxy.git
synced 2026-03-28 05:14:56 -04:00
CLEANUP: http: remove a useless null check
srv cannot be null in http_perform_server_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 <dkorunic@reflected.net>
This commit is contained in:
parent
9e60cd84b7
commit
4521ba689c
1 changed files with 1 additions and 2 deletions
|
|
@ -817,8 +817,7 @@ void http_perform_server_redirect(struct session *s, struct stream_interface *si
|
|||
http_server_error(s, si, SN_ERR_PRXCOND, SN_FINST_C, 302, &trash);
|
||||
|
||||
/* FIXME: we should increase a counter of redirects per server and per backend. */
|
||||
if (srv)
|
||||
srv_inc_sess_ctr(srv);
|
||||
srv_inc_sess_ctr(srv);
|
||||
}
|
||||
|
||||
/* Return the error message corresponding to si->err_type. It is assumed
|
||||
|
|
|
|||
Loading…
Reference in a new issue