]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: sslsock: remove only occurrence of local variable "cs"
authorWilly Tarreau <w@1wt.eu>
Fri, 27 May 2022 08:44:39 +0000 (10:44 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 27 May 2022 17:33:35 +0000 (19:33 +0200)
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

index 060269bcf96502f98bd0c39f50fc05a13dc9b54b..83204c169409edff5fcc65e10e280936df717c90 100644 (file)
@@ -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;
                }