mirror of
https://github.com/moparisthebest/pacman
synced 2024-11-10 11:35:00 -05:00
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
@ -80,13 +80,6 @@ int parse_ini(const char *file, ini_parser_fn cb, void *data)
|
||||
|
||||
if(line[0] == '[' && line[line_len - 1] == ']') {
|
||||
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 '[' */
|
||||
name = strdup(line + 1);
|
||||
name[line_len - 2] = '\0';
|
||||
|
Loading…
Reference in New Issue
Block a user