]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: cfgparse-global: remove redundant goto
authorValentine Krasnobaeva <vkrasnobaeva@haproxy.com>
Wed, 14 Aug 2024 12:49:51 +0000 (14:49 +0200)
committerWilliam Lallemand <wlallemand@haproxy.com>
Tue, 20 Aug 2024 17:16:29 +0000 (19:16 +0200)
In the case, when the given keyword was found in the global 'cfg_kws' list, we
go to 'out' label anyway, after testing rc returned by the keyword's parser. So
there is not a much gain if we perform 'goto out' jump specifically when rc > 0.

src/cfgparse-global.c

index 7908c5d9aa8029bfe9cd1c02fea20e7a97341964..0e4a7e914ec4aa875ea719413fed0a0881547319 100644 (file)
@@ -1294,7 +1294,6 @@ int cfg_parse_global(const char *file, int linenum, char **args, int kwm)
                                        else if (rc > 0) {
                                                ha_warning("parsing [%s:%d] : %s\n", file, linenum, errmsg);
                                                err_code |= ERR_WARN;
-                                               goto out;
                                        }
                                        goto out;
                                }