diff options
author | Mike Pechkin <mpech@cvs.openbsd.org> | 2003-07-25 10:28:54 +0000 |
---|---|---|
committer | Mike Pechkin <mpech@cvs.openbsd.org> | 2003-07-25 10:28:54 +0000 |
commit | 5a2c9ef175ca3fa26a841587c12674f2f8708ade (patch) | |
tree | 0e09d60df925de5467519780810655f0f8086053 /usr.bin/newsyslog | |
parent | 2ec7e0c665f6da2ffb2709779e5aa39b06c088b8 (diff) |
When parser_file() fails, print correct line number.
millert@ ok
Diffstat (limited to 'usr.bin/newsyslog')
-rw-r--r-- | usr.bin/newsyslog/newsyslog.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/newsyslog/newsyslog.c b/usr.bin/newsyslog/newsyslog.c index 6e6eb7486e6..8e4090cd527 100644 --- a/usr.bin/newsyslog/newsyslog.c +++ b/usr.bin/newsyslog/newsyslog.c @@ -1,4 +1,4 @@ -/* $OpenBSD: newsyslog.c,v 1.74 2003/07/01 23:43:12 millert Exp $ */ +/* $OpenBSD: newsyslog.c,v 1.75 2003/07/25 10:28:53 mpech Exp $ */ /* * Copyright (c) 1999, 2002, 2003 Todd C. Miller <Todd.Miller@courtesan.com> @@ -71,7 +71,7 @@ */ #ifndef lint -static const char rcsid[] = "$OpenBSD: newsyslog.c,v 1.74 2003/07/01 23:43:12 millert Exp $"; +static const char rcsid[] = "$OpenBSD: newsyslog.c,v 1.75 2003/07/25 10:28:53 mpech Exp $"; #endif /* not lint */ #ifndef CONF @@ -490,7 +490,7 @@ parse_file(int *nentries) err(1, "can't open %s", conf); *nentries = 0; - for (lineno = 0; fgets(line, sizeof(line), f); lineno++) { + for (lineno = 1; fgets(line, sizeof(line), f); lineno++) { tmp = sob(line); if (*tmp == '\0' || *tmp == '#') continue; |