From: Willy Tarreau Date: Fri, 12 Feb 2021 11:07:38 +0000 (+0100) Subject: BUG/MINOR: extcheck: proxy_parse_extcheck() must take a const for the defproxy X-Git-Tag: v2.4-dev8~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=220fd7069469de5892c6ba3e1f178150b51c52bc;p=thirdparty%2Fhaproxy.git BUG/MINOR: extcheck: proxy_parse_extcheck() must take a const for the defproxy The default proxy was passed as a variable, which in addition to being a PITA to deal with in the config parser, doesn't feel safe to use when it ought to be const. This will only affect new code so no backport is needed. --- diff --git a/include/haproxy/extcheck.h b/include/haproxy/extcheck.h index 762971951b..6186bee9ad 100644 --- a/include/haproxy/extcheck.h +++ b/include/haproxy/extcheck.h @@ -35,7 +35,7 @@ int proxy_parse_extcheck(char **args, int section, struct proxy *curpx, struct proxy *defpx, const char *file, int line, char **errmsg); -int proxy_parse_external_check_opt(char **args, int cur_arg, struct proxy *curpx, struct proxy *defpx, +int proxy_parse_external_check_opt(char **args, int cur_arg, struct proxy *curpx, const struct proxy *defpx, const char *file, int line); diff --git a/src/extcheck.c b/src/extcheck.c index 6665e96bfb..9ef87c55b1 100644 --- a/src/extcheck.c +++ b/src/extcheck.c @@ -648,7 +648,7 @@ error: return -1; } -int proxy_parse_external_check_opt(char **args, int cur_arg, struct proxy *curpx, struct proxy *defpx, +int proxy_parse_external_check_opt(char **args, int cur_arg, struct proxy *curpx, const struct proxy *defpx, const char *file, int line) { int err_code = 0;