int err = -2; /* Parse error */
FILE *fp;
char *buffer, *line;
- char *variable, *value;
+ char *variable, *value, *eol;
int lineno = 0;
int len;
bool ignore = false;
variable = value = line;
+ eol = line + strlen(line);
+ while(strchr("\t ", *--eol))
+ *eol = '\0';
+
len = strcspn(value, "\t =");
value += len;
value += strspn(value, "\t ");
}
variable[len] = '\0';
+
if(!*value) {
logger(LOG_ERR, _("No value for variable `%s' on line %d while reading config file %s"),
variable, lineno, fname);