]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: log: Remove unused case statement during the log-format string parsing
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 6 Jul 2020 17:03:25 +0000 (19:03 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 7 Jul 2020 12:28:43 +0000 (14:28 +0200)
Since the commit cd0d2ed6e ("MEDIUM: log-format: make the LF parser aware of
sample expressions' end"), the LF_STEXPR label in the last switch-case statement
at the end of the for loop in the parse_logformat_string() function cannot be
reached anymore.

This patch should fix the issue #723.

src/log.c

index e65b9ca9958c095ef731d23077f16a39bca2b023..937b675a73a4d09831ca9a759e1c427792e2215a 100644 (file)
--- a/src/log.c
+++ b/src/log.c
@@ -717,10 +717,6 @@ int parse_logformat_string(const char *fmt, struct proxy *curproxy, struct list
                                if (!parse_logformat_var(arg, arg_len, var, var_len, curproxy, list_format, &options, err))
                                        goto fail;
                                break;
-                       case LF_STEXPR:
-                               if (!add_sample_to_logformat_list(var, arg, arg_len, curproxy, list_format, options, cap, err, &sp))
-                                       goto fail;
-                               break;
                        case LF_TEXT:
                        case LF_SEPARATOR:
                                if (!add_to_logformat_list(sp, str, pformat, list_format, err))