diff options
author | Simon Bertrang <simon@cvs.openbsd.org> | 2008-03-08 01:23:17 +0000 |
---|---|---|
committer | Simon Bertrang <simon@cvs.openbsd.org> | 2008-03-08 01:23:17 +0000 |
commit | 512baa4b72c491e73ffd7ec968b1cb332e7d8944 (patch) | |
tree | 8dbcc68527bcf1367328b6bba2765225d87e98a6 | |
parent | a1e8b70a282a4fc00d9753ade864217a4cd07769 (diff) |
avoid request for input if lines are set to zero
ok deraadt@, sthen@
-rw-r--r-- | usr.sbin/config/ukcutil.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/config/ukcutil.c b/usr.sbin/config/ukcutil.c index 288915c12ad..ea2c856840b 100644 --- a/usr.sbin/config/ukcutil.c +++ b/usr.sbin/config/ukcutil.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ukcutil.c,v 1.14 2004/01/04 18:30:05 deraadt Exp $ */ +/* $OpenBSD: ukcutil.c,v 1.15 2008/03/08 01:23:16 simon Exp $ */ /* * Copyright (c) 1999-2001 Mats O Jansson. All rights reserved. @@ -25,7 +25,7 @@ */ #ifndef LINT -static char rcsid[] = "$OpenBSD: ukcutil.c,v 1.14 2004/01/04 18:30:05 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: ukcutil.c,v 1.15 2008/03/08 01:23:16 simon Exp $"; #endif #include <sys/types.h> @@ -97,7 +97,7 @@ more(void) cmd_t cmd; if (cnt != -1) { - if (cnt == lines) { + if (cnt > 0 && cnt == lines) { printf("--- more ---"); fflush(stdout); ask_cmd(&cmd); |