CLEANUP: backend: Remove useless test on server's xprt

The server's xprt is always defined and cannot be NULL. So there is no
reason to test it. It could lead to wrong assumptions later in the code.

This patch should fix a Coverity report from #3213.
This commit is contained in:
Christopher Faulet 2025-12-15 07:56:52 +01:00
parent a08bc468d2
commit 5c5914c32e

View File

@ -2042,7 +2042,7 @@ int connect_server(struct stream *s)
struct ist sni = IST_NULL;
/* Set socket SNI */
if (srv->xprt && srv->xprt->get_ssl_sock_ctx && srv->ssl_ctx.sni) {
if (srv->xprt->get_ssl_sock_ctx && srv->ssl_ctx.sni) {
sni_smp = sample_fetch_as_type(s->be, s->sess, s,
SMP_OPT_DIR_REQ | SMP_OPT_FINAL,
srv->ssl_ctx.sni, SMP_T_STR);