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:
Andrew Gregory 2014-04-26 12:34:11 -04:00 committed by Allan McRae
parent 4ccafc484d
commit e7d8e2b5ac
1 changed files with 0 additions and 7 deletions

View File

@ -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';