]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: server: Fix server_finalize_init() to avoid unused variable
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 27 Apr 2020 09:17:10 +0000 (11:17 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 27 Apr 2020 09:17:12 +0000 (11:17 +0200)
The variable 'ret' must only be declared When HAProxy is compiled with the SSL
support (more precisely SSL_CTRL_SET_TLSEXT_HOSTNAME must be defined).

No backport needed.

src/server.c

index 14eb41f9d92429d788432bcff4ad8106f2248bb0..4d5e706d3a4843c43bf96acabce11b92867001e8 100644 (file)
@@ -1805,7 +1805,9 @@ static int server_sni_expr_init(const char *file, int linenum, char **args, int
 static int server_finalize_init(const char *file, int linenum, char **args, int cur_arg,
                                 struct server *srv, struct proxy *px)
 {
+#ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME
        int ret;
+#endif
 
        if (srv->do_check && srv->trackit) {
                ha_alert("parsing [%s:%d]: unable to enable checks and tracking at the same time!\n",