From 512baa4b72c491e73ffd7ec968b1cb332e7d8944 Mon Sep 17 00:00:00 2001 From: Simon Bertrang Date: Sat, 8 Mar 2008 01:23:17 +0000 Subject: avoid request for input if lines are set to zero ok deraadt@, sthen@ --- usr.sbin/config/ukcutil.c | 6 +++--- 1 file 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 @@ -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); -- cgit v1.2.3