(_mu_config_register_section): Zero out the root container after creation.
(_mu_parse_config): Use "program" not "prog" for per-program sections.
Showing
1 changed file
with
2 additions
and
1 deletions
... | @@ -451,6 +451,7 @@ _mu_config_register_section (struct mu_cfg_cont **proot, | ... | @@ -451,6 +451,7 @@ _mu_config_register_section (struct mu_cfg_cont **proot, |
451 | rc = mu_config_create_container (proot, mu_cfg_cont_section); | 451 | rc = mu_config_create_container (proot, mu_cfg_cont_section); |
452 | if (rc) | 452 | if (rc) |
453 | return rc; | 453 | return rc; |
454 | memset (&(*proot)->v.section, 0, sizeof (*proot)->v.section); | ||
454 | } | 455 | } |
455 | 456 | ||
456 | root_section = &(*proot)->v.section; | 457 | root_section = &(*proot)->v.section; |
... | @@ -594,7 +595,7 @@ _mu_parse_config (char *file, char *progname, | ... | @@ -594,7 +595,7 @@ _mu_parse_config (char *file, char *progname, |
594 | static struct mu_cfg_param empty_param = { NULL }; | 595 | static struct mu_cfg_param empty_param = { NULL }; |
595 | if (!progparam) | 596 | if (!progparam) |
596 | progparam = &empty_param; | 597 | progparam = &empty_param; |
597 | _mu_config_register_section (&cont, NULL, "prog", prog_parser, | 598 | _mu_config_register_section (&cont, NULL, "program", prog_parser, |
598 | progname, | 599 | progname, |
599 | progparam, &prog_sect); | 600 | progparam, &prog_sect); |
600 | 601 | ... | ... |
-
Please register or sign in to post a comment