Hi,
I’m not sure whether this change causes any non-obvious issues but the compiler 
was happy.

Regards
Max

Apply with `git am --scissors` to automatically cut the commit message.

-- >8 --
This change is for consistency with `cfg_eval_condition()`.
---
 include/haproxy/tools.h | 2 +-
 src/cfgparse.c          | 2 +-
 src/tools.c             | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/haproxy/tools.h b/include/haproxy/tools.h
index 2e3adf2f7..e376a716e 100644
--- a/include/haproxy/tools.h
+++ b/include/haproxy/tools.h
@@ -891,7 +891,7 @@ int my_unsetenv(const char *name);
  * some expansion is made.
  */
 char *env_expand(char *in);
-uint32_t parse_line(char *in, char *out, size_t *outlen, char **args, int 
*nbargs, uint32_t opts, char **errptr);
+uint32_t parse_line(char *in, char *out, size_t *outlen, char **args, int 
*nbargs, uint32_t opts, const char **errptr);
 size_t sanitize_for_printing(char *line, size_t pos, size_t width);
 void update_word_fingerprint(uint8_t *fp, const char *word);
 void make_word_fingerprint(uint8_t *fp, const char *word);
diff --git a/src/cfgparse.c b/src/cfgparse.c
index 46c7eeeeb..4f2729d32 100644
--- a/src/cfgparse.c
+++ b/src/cfgparse.c
@@ -1959,7 +1959,7 @@ int readcfgfile(const char *file)
 
                while (1) {
                        uint32_t err;
-                       char *errptr;
+                       const char *errptr;
 
                        arg = sizeof(args) / sizeof(*args);
                        outlen = outlinesize;
diff --git a/src/tools.c b/src/tools.c
index 718bb49b8..bd6bf4edc 100644
--- a/src/tools.c
+++ b/src/tools.c
@@ -5183,7 +5183,7 @@ void ha_generate_uuid(struct buffer *output)
  * the string. One solution for the caller may consist in replacing all args
  * delimiters with spaces in this case.
  */
-uint32_t parse_line(char *in, char *out, size_t *outlen, char **args, int 
*nbargs, uint32_t opts, char **errptr)
+uint32_t parse_line(char *in, char *out, size_t *outlen, char **args, int 
*nbargs, uint32_t opts, const char **errptr)
 {
        char *quote = NULL;
        char *brace = NULL;
-- 
2.25.1


Reply via email to