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:
parent
e7d8e2b5ac
commit
ea96b56722
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue