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
@ -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…
x
Reference in New Issue
Block a user