bugfix: don't print '.' if no prefix

It's confusing to read "Section ".rlc" not allowed" when it should be
"Section "rlc" not allowed".
This commit is contained in:
Cedric Roux
2025-06-05 10:13:09 +02:00
parent 915f9d55d8
commit c1372a52c8
+5 -1
View File
@@ -846,7 +846,11 @@ static void verify_section_notset(configmodule_interface_t *cfg, char *aprefix,
paramlist_def_t pl = {0};
strncpy(pl.listname, secname, sizeof(pl.listname) - 1);
config_getlist(cfg, &pl, NULL, 0, aprefix);
AssertFatal(pl.numelt == 0, "Section \"%s.%s\" not allowed in this config, please remove it\n", aprefix ? aprefix : "", secname);
AssertFatal(pl.numelt == 0,
"Section \"%s%s%s\" not allowed in this config, please remove it\n",
aprefix ? aprefix : "",
aprefix ? "." : "",
secname);
}
void RCconfig_verify(configmodule_interface_t *cfg, ngran_node_t node_type)
{