diff options
author | dd <dd@FreeBSD.org> | 2002-03-09 03:52:14 +0000 |
---|---|---|
committer | dd <dd@FreeBSD.org> | 2002-03-09 03:52:14 +0000 |
commit | 165dbb1a74116f1fe5c011c487af7529a0c24b8a (patch) | |
tree | 261067d995bb260caa75609342f142b26fa20a8f /usr.sbin | |
parent | fa8475a7f60257af5e650a70ab42edf1362a2215 (diff) | |
download | FreeBSD-src-165dbb1a74116f1fe5c011c487af7529a0c24b8a.zip FreeBSD-src-165dbb1a74116f1fe5c011c487af7529a0c24b8a.tar.gz |
When reporting that a line is too long, include the line number in the
error message. While I'm here, add a note that the "line too long"
message isn't always accurate.
PR: 35395
Submitted by: andrew@ugh.net.au
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/pwd_mkdb/pwd_mkdb.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/pwd_mkdb/pwd_mkdb.c b/usr.sbin/pwd_mkdb/pwd_mkdb.c index 40dc511..bb913c4 100644 --- a/usr.sbin/pwd_mkdb/pwd_mkdb.c +++ b/usr.sbin/pwd_mkdb/pwd_mkdb.c @@ -505,7 +505,11 @@ scan(fp, pw) * -- The Who */ if (!(p = strchr(line, '\n'))) { - warnx("line too long"); + /* + * XXX: This may also happen if the last line in a + * file does not have a trailing newline. + */ + warnx("line #%d too long", lcnt); goto fmt; } |