From: Miroslav Zagorac Date: Mon, 19 Sep 2022 10:18:53 +0000 (+0200) Subject: CLEANUP: httpclient: deleted unused variables X-Git-Tag: v2.7-dev7~61 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=133e2a23d00f7ce2159afbc1908920b5bef9e431;p=thirdparty%2Fhaproxy.git CLEANUP: httpclient: deleted unused variables The locally defined static variables 'httpclient_srv_raw' and 'httpclient_srv_ssl' are not used anywhere in the source code, except that they are set in the httpclient_precheck() function. --- diff --git a/src/http_client.c b/src/http_client.c index 155045d43f..b5588eb5e9 100644 --- a/src/http_client.c +++ b/src/http_client.c @@ -41,12 +41,10 @@ static struct proxy *httpclient_proxy; -static struct server *httpclient_srv_raw; #ifdef USE_OPENSSL /* if the httpclient is not configured, error are ignored and features are limited */ static int hard_error_ssl = 0; -static struct server *httpclient_srv_ssl; static int httpclient_ssl_verify = SSL_SOCK_VERIFY_REQUIRED; static char *httpclient_ssl_ca_file = NULL; #endif @@ -1314,32 +1312,12 @@ err: */ static int httpclient_precheck() { - struct server *srv; - /* initialize the default httpclient_proxy which is used for the CLI and the lua */ httpclient_proxy = httpclient_create_proxy(""); if (!httpclient_proxy) return 1; - /* store the ptr of the 2 servers */ - for (srv = httpclient_proxy->srv; srv != NULL; srv = srv->next) { - if (srv->xprt == xprt_get(XPRT_RAW)) { - httpclient_srv_raw = srv; -#ifdef USE_OPENSSL - } else if (srv->xprt == xprt_get(XPRT_SSL)) { - httpclient_srv_ssl = srv; -#endif - } - } - - if (!httpclient_srv_raw) - return 1; -#ifdef USE_OPENSSL - if (!httpclient_srv_ssl) - return 1; -#endif - return 0; }