ini.c: remove empty section name restriction
alpm will reject empty database names already. Reduces error handling in the ini parser. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
This commit is contained in:
parent
4ccafc484d
commit
e7d8e2b5ac
1 changed files with 0 additions and 7 deletions
|
@ -80,13 +80,6 @@ int parse_ini(const char *file, ini_parser_fn cb, void *data)
|
||||||
|
|
||||||
if(line[0] == '[' && line[line_len - 1] == ']') {
|
if(line[0] == '[' && line[line_len - 1] == ']') {
|
||||||
char *name;
|
char *name;
|
||||||
/* only possibility here is a line == '[]' */
|
|
||||||
if(line_len <= 2) {
|
|
||||||
pm_printf(ALPM_LOG_ERROR, _("config file %s, line %d: bad section name.\n"),
|
|
||||||
file, linenum);
|
|
||||||
ret = 1;
|
|
||||||
goto cleanup;
|
|
||||||
}
|
|
||||||
/* new config section, skip the '[' */
|
/* new config section, skip the '[' */
|
||||||
name = strdup(line + 1);
|
name = strdup(line + 1);
|
||||||
name[line_len - 2] = '\0';
|
name[line_len - 2] = '\0';
|
||||||
|
|
Loading…
Add table
Reference in a new issue