Fix context line number in error reporting.

This patch is imported from the rinetd Debian package.
This commit is contained in:
Sam Hocevar 2016-01-10 22:25:07 +01:00
parent 7330c19177
commit b6ded86fe5

View File

@ -699,6 +699,7 @@ int getConfLine(FILE *in, char *line, int space, int *lnum)
{
char *p;
while (1) {
(*lnum)++;
if (!fgets(line, space, in)) {
return 0;
}
@ -714,7 +715,6 @@ int getConfLine(FILE *in, char *line, int space, int *lnum)
/* Comment lines are also OK */
continue;
}
(*lnum)++;
return 1;
}
}