Browse Source

* config.[ch]: f2b_config_append() -> f2b_config_section_append()

master
Alex 'AdUser' Z 9 years ago
parent
commit
66ea8c2115
  1. 4
      src/config.c
  2. 2
      src/config.h

4
src/config.c

@ -207,7 +207,7 @@ f2b_config_load(f2b_config_t *config, const char *path) {
section = f2b_config_section_create(p); section = f2b_config_section_create(p);
if (section) { if (section) {
skip_section = false; skip_section = false;
section = f2b_config_append(config, section); section = f2b_config_section_append(config, section);
} else { } else {
skip_section = true; skip_section = true;
f2b_log_msg(log_error, "unknown section at line %d: %s", linenum, p); f2b_log_msg(log_error, "unknown section at line %d: %s", linenum, p);
@ -261,7 +261,7 @@ f2b_config_free(f2b_config_t *config) {
} }
f2b_config_section_t * f2b_config_section_t *
f2b_config_append(f2b_config_t *config, f2b_config_section_t *section) { f2b_config_section_append(f2b_config_t *config, f2b_config_section_t *section) {
f2b_config_section_t *prev = NULL; f2b_config_section_t *prev = NULL;
f2b_config_section_t **s = NULL; f2b_config_section_t **s = NULL;

2
src/config.h

@ -43,8 +43,8 @@ f2b_config_param_t * f2b_config_param_append(f2b_config_param_t *list, f2b_confi
f2b_config_section_t * f2b_config_section_create(const char *line); f2b_config_section_t * f2b_config_section_create(const char *line);
f2b_config_section_t * f2b_config_section_find (f2b_config_section_t *s, const char *name); f2b_config_section_t * f2b_config_section_find (f2b_config_section_t *s, const char *name);
f2b_config_section_t * f2b_config_section_append(f2b_config_t *c, f2b_config_section_t *s);
bool f2b_config_load(f2b_config_t *c, const char *path); bool f2b_config_load(f2b_config_t *c, const char *path);
void f2b_config_free(f2b_config_t *c); void f2b_config_free(f2b_config_t *c);
f2b_config_section_t * f2b_config_append(f2b_config_t *c, f2b_config_section_t *s);
#endif /* CONFIG_H_ */ #endif /* CONFIG_H_ */

Loading…
Cancel
Save