filter: Don't ignore lines with leading whitespace

This patch is related to parsing the filter file.
The new code skips leading whitespaces before removing trailing
whitespaces and comments.
Without doing this, lines with leading whitespace are treated like empty
lines (i.e. they are ignored).
This commit is contained in:
Janosch Hoffmann 2019-05-05 10:24:52 +02:00
parent b131f45cbb
commit 10d36d48a4

View File

@ -78,6 +78,9 @@ void filter_init (void)
* comments. * comments.
*/ */
s = buf; s = buf;
/* skip leading whitespace */
while (*s && isspace ((unsigned char) *s))
++s;
while (*s) { while (*s) {
if (isspace ((unsigned char) *s)) if (isspace ((unsigned char) *s))
break; break;