]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: startup: fix unused value reported by coverity
authorValentine Krasnobaeva <vkrasnobaeva@haproxy.com>
Thu, 8 Aug 2024 16:54:28 +0000 (18:54 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 8 Aug 2024 17:54:12 +0000 (19:54 +0200)
Unused 0 is assigned to ret, as it's rewritten by error code of read_cfg().
This issue was reported by coverity.

src/haproxy.c

index c607941ad3b0355ac61f85ee03b6d81a9f57f1f7..0c1aeacb787d758db26a18df8adbe2733a520550 100644 (file)
@@ -1976,12 +1976,11 @@ static void init(int argc, char **argv)
 {
        char *progname = global.log_tag.area;
        int err_code = 0;
-       int ret = 0;
        struct proxy *px;
        struct post_check_fct *pcf;
        struct pre_check_fct *prcf;
        struct cfgfile *cfg, *cfg_tmp;
-       int ideal_maxconn;
+       int ret, ideal_maxconn;
        const char *cc, *cflags, *opts;
 
 #ifdef USE_OPENSSL