summaryrefslogtreecommitdiff
path: root/usr.bin/less
diff options
context:
space:
mode:
authormmcc <mmcc@cvs.openbsd.org>2015-12-25 14:29:23 +0000
committermmcc <mmcc@cvs.openbsd.org>2015-12-25 14:29:23 +0000
commit3da7ed0213d7ba6ae3c79fb8cda2f0dd831253ec (patch)
treeda7f0223c9b4e12964cfd2291ab663a802a8663b /usr.bin/less
parent6929ccd0b8fb97c64b0b58c8c9d3a339ac958979 (diff)
inline a once-used function that just prints a warning
ok benno@
Diffstat (limited to 'usr.bin/less')
-rw-r--r--usr.bin/less/linenum.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/usr.bin/less/linenum.c b/usr.bin/less/linenum.c
index 8d79fa0bd3e..7d6c8140f11 100644
--- a/usr.bin/less/linenum.c
+++ b/usr.bin/less/linenum.c
@@ -196,16 +196,6 @@ add_lnum(LINENUM linenum, off_t pos)
}
}
-/*
- * If we get stuck in a long loop trying to figure out the
- * line number, print a message to tell the user what we're doing.
- */
-static void
-longloopmessage(void)
-{
- ierror("Calculating line numbers", NULL);
-}
-
static int loopcount;
static time_t startime;
@@ -215,7 +205,7 @@ longish(void)
if (loopcount >= 0 && ++loopcount > 100) {
loopcount = 0;
if (time(NULL) >= startime + LONGTIME) {
- longloopmessage();
+ ierror("Calculating line numbers", NULL);
loopcount = -1;
}
}