From b52d4d217fdcfc83ab90275609b94d077bd97a76 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Fri, 27 May 2022 10:44:39 +0200 Subject: [PATCH] CLEANUP: sslsock: remove only occurrence of local variable "cs" In ssl_action_wait_for_hs() the local variables called "cs" is just a copy of s->scf that's only used once, so it can be removed. In addition the check was removed as well since it's not possible to have a NULL SC on a stream. --- src/ssl_sock.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/ssl_sock.c b/src/ssl_sock.c index 060269bcf9..83204c1694 100644 --- a/src/ssl_sock.c +++ b/src/ssl_sock.c @@ -7868,14 +7868,12 @@ enum act_return ssl_action_wait_for_hs(struct act_rule *rule, struct proxy *px, struct session *sess, struct stream *s, int flags) { struct connection *conn; - struct stconn *cs; conn = objt_conn(sess->origin); - cs = s->scf; - if (conn && cs) { + if (conn) { if (conn->flags & (CO_FL_EARLY_SSL_HS | CO_FL_SSL_WAIT_HS)) { - sc_ep_set(cs, SE_FL_WAIT_FOR_HS); + sc_ep_set(s->scf, SE_FL_WAIT_FOR_HS); s->req.flags |= CF_READ_NULL; return ACT_RET_YIELD; }