mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Warn if there is no newline at the end of the group file.
PR: 51256 Submitted by: Brian D Gallaway <bdg730@makserver0.usask.ca> Reviewed by: tjr, -audit Approved by: tjr
This commit is contained in:
parent
173cc338ed
commit
f02cd7c7d0
1 changed files with 4 additions and 0 deletions
|
|
@ -74,6 +74,10 @@ main(int argc, char *argv[])
|
|||
while (++n) {
|
||||
if ((line = fgetln(gf, &len)) == NULL)
|
||||
break;
|
||||
if (len > 0 && line[len - 1] != '\n') {
|
||||
warnx("%s: line %d: no newline character", gfn, n);
|
||||
e++;
|
||||
}
|
||||
while (len && isspace(line[len-1]))
|
||||
len--;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue