]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MEDIUM: stats-file: explicitely ignore comments starting by //
authorWilliam Lallemand <wlallemand@haproxy.com>
Tue, 19 Nov 2024 14:43:35 +0000 (15:43 +0100)
committerWilliam Lallemand <wlallemand@haproxy.com>
Tue, 19 Nov 2024 14:49:44 +0000 (15:49 +0100)
Explicitely ignore comments starting by // so they don't emit a warning.

src/stats-file.c

index a26f07e5fd0405475b1275ed5f5f0c5087967e13..cc1b636ce984fe78aeb11f89ff2ab35638ba8a05 100644 (file)
@@ -385,6 +385,10 @@ void apply_stats_file(void)
                if (!istlen(istline))
                        continue;
 
+               /* comment line starts by // */
+               if (istmatch(istline, ist("//")) != 0)
+                       continue;
+
                if (*istptr(istline) == '#') {
                        if (parse_header_line(istline, &st_tree, &domain, cols)) {
                                if (!valid_format) {