ini.c: remove useless key check

key points to a statically allocated string so it can't be NULL and
empty keys are rejected by the callback.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
This commit is contained in:
Andrew Gregory 2014-04-26 12:34:27 -04:00 committed by Allan McRae
parent e7d8e2b5ac
commit ea96b56722
1 changed files with 0 additions and 6 deletions

View File

@ -103,12 +103,6 @@ int parse_ini(const char *file, ini_parser_fn cb, void *data)
strtrim(key);
strtrim(value);
if(key == NULL) {
pm_printf(ALPM_LOG_ERROR, _("config file %s, line %d: syntax error in config file- missing key.\n"),
file, linenum);
ret = 1;
goto cleanup;
}
if((ret = cb(file, linenum, section_name, key, value, data)) != 0) {
goto cleanup;
}