From 51ccad7517e599351d1b7e40ebc03552f71ea3fc Mon Sep 17 00:00:00 2001 From: aymeric Date: Sun, 9 Jul 2000 12:14:01 +0000 Subject: [PATCH] newsyslog wouldn't parse the count field because sscanf return value was tested against the wrong value (0 != 1) --- usr.bin/newsyslog/newsyslog.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.bin/newsyslog/newsyslog.c b/usr.bin/newsyslog/newsyslog.c index 15b5ae5afe97..cac73d4d16a6 100644 --- a/usr.bin/newsyslog/newsyslog.c +++ b/usr.bin/newsyslog/newsyslog.c @@ -1,4 +1,4 @@ -/* $NetBSD: newsyslog.c,v 1.25 2000/07/07 15:42:35 ad Exp $ */ +/* $NetBSD: newsyslog.c,v 1.26 2000/07/09 12:14:01 aymeric Exp $ */ /* * Copyright (c) 1999, 2000 Andrew Doran @@ -57,7 +57,7 @@ #include #ifndef lint -__RCSID("$NetBSD: newsyslog.c,v 1.25 2000/07/07 15:42:35 ad Exp $"); +__RCSID("$NetBSD: newsyslog.c,v 1.26 2000/07/09 12:14:01 aymeric Exp $"); #endif /* not lint */ #include @@ -232,7 +232,7 @@ parse(struct conf_entry *log, FILE *fd, size_t *_lineno) } log->mode = (mode_t)i; - if (sscanf(*ap++, "%d", &log->numhist) != 0) { + if (sscanf(*ap++, "%d", &log->numhist) != 1) { warnx("config line %d: bad log count", lineno); return (-1); }