diff options
author | Andrew Gregory <andrew.gregory.8@gmail.com> | 2014-04-26 18:34:11 +0200 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2015-01-21 05:27:46 +0100 |
commit | e7d8e2b5acfbe9169c809e1e8fd31d22b7c365c5 (patch) | |
tree | 605155240eddbe7d0c04eb7db99f0da36213b217 | |
parent | 4ccafc484d43710d66d2622210cf33461b1b1c49 (diff) | |
download | pacman-e7d8e2b5acfbe9169c809e1e8fd31d22b7c365c5.tar.gz pacman-e7d8e2b5acfbe9169c809e1e8fd31d22b7c365c5.tar.xz |
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>
-rw-r--r-- | src/pacman/ini.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/src/pacman/ini.c b/src/pacman/ini.c index f4f606b2..7291e971 100644 --- a/src/pacman/ini.c +++ b/src/pacman/ini.c @@ -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'; |