conf: remove trailing whitespace via C code, not regex
This commit is contained in:
parent
22f059dc5e
commit
ae4cbcabd1
@ -333,6 +333,9 @@ static int config_parse (struct config_s *conf, FILE * f)
|
||||
e = config_directive_find(p, strlen(p));
|
||||
++q;
|
||||
while(isspace(*q))++q;
|
||||
p = q;
|
||||
while(*p && *p != '\n') ++p;
|
||||
while(isspace(*p)) *(p--) = 0;
|
||||
if (!e || e->value == CD_NIL || check_match (conf, q, lineno, e->value)) {
|
||||
fprintf (stderr, "ERROR: Syntax error on line %lu\n", lineno);
|
||||
return 1;
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
#define IPV6MASK "(" IPV6 "(/" DIGIT "+)?)"
|
||||
#define BEGIN "^"
|
||||
#define END SPACE "*$"
|
||||
#define END "$"
|
||||
|
||||
|
||||
STDCONF (logfile, STR, handle_logfile),
|
||||
|
Loading…
Reference in New Issue
Block a user