]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: startup: rename readcfgfile in parse_cfg
authorValentine Krasnobaeva <vkrasnobaeva@haproxy.com>
Mon, 5 Aug 2024 08:04:03 +0000 (10:04 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 7 Aug 2024 16:41:41 +0000 (18:41 +0200)
As readcfgfile no longer opens configuration files and reads them with fgets,
but performs only the parsing of provided data, let's rename it to parse_cfg by
analogy with read_cfg in haproxy.c.

addons/ot/src/parser.c
include/haproxy/cfgparse.h
src/cfgparse.c
src/flt_spoe.c
src/haproxy.c

index 74585b3f1e64987d881733cc04fea5c2712bce9c..0f8fc5495f3e42332ed421093e361f03d1a558a7 100644 (file)
@@ -1102,7 +1102,7 @@ static int flt_ot_parse_cfg(struct flt_ot_conf *conf, const char *flt_name, char
                        ha_free(&cfg_file.content);
                        FLT_OT_RETURN_INT(retval);
                }
-               retval = readcfgfile(&cfg_file);
+               retval = parse_cfg(&cfg_file);
                ha_free(&cfg_file.content);
        }
 
index fb6eef261e5a85dbf7d60bc56d31624b50865920..04c4ed94ae81d7019dcf58905b7c05110fbaf207 100644 (file)
@@ -112,7 +112,7 @@ int cfg_parse_global(const char *file, int linenum, char **args, int inv);
 int cfg_parse_listen(const char *file, int linenum, char **args, int inv);
 int cfg_parse_track_sc_num(unsigned int *track_sc_num,
                            const char *arg, const char *end, char **err);
-int readcfgfile(const struct cfgfile *cfg);
+int parse_cfg(const struct cfgfile *cfg);
 void cfg_register_keywords(struct cfg_kw_list *kwl);
 void cfg_unregister_keywords(struct cfg_kw_list *kwl);
 int check_config_validity(void);
index 4c3f76447137cc17cc1de220d61280fa68ad0274..24c22f9cc473da9cbd9a5ebc4a07e9c839a37444 100644 (file)
@@ -1826,7 +1826,7 @@ free_mem:
  * Only the two first ones can stop processing, the two others are just
  * indicators.
  */
-int readcfgfile(const struct cfgfile *cfg)
+int parse_cfg(const struct cfgfile *cfg)
 {
        char *thisline = NULL;
        int linesize = LINESIZE;
index 9358283dac354280b55b28a0aa7860b7db5a0a47..1f3709b371f64412168cb60a6e0212f320d742db 100644 (file)
@@ -2272,7 +2272,7 @@ static int parse_spoe_flt(char **args, int *cur_arg, struct proxy *px,
        if (cfg_file.size < 0) {
                goto error;
        }
-       ret = readcfgfile(&cfg_file);
+       ret = parse_cfg(&cfg_file);
        ha_free(&cfg_file.content);
 
        /* unregister SPOE sections and restore previous sections */
index a4341dac6ba178f25ce42199ea4cb5b9f8188618..c607941ad3b0355ac61f85ee03b6d81a9f57f1f7 100644 (file)
@@ -1206,7 +1206,7 @@ static int read_cfg(char *progname)
                        goto err;
                }
 
-               ret = readcfgfile(cfg);
+               ret = parse_cfg(cfg);
                if (ret == -1)
                        goto err;