From 8c6999ca73a8b697b93ede399ac5f743996958f0 Mon Sep 17 00:00:00 2001 From: op Date: Tue, 27 Aug 2024 19:27:19 +0000 Subject: [PATCH] inline `start' and simplify; from/ok millert@ --- bin/ksh/history.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bin/ksh/history.c b/bin/ksh/history.c index 6f4a1c8e571..dea44ad4480 100644 --- a/bin/ksh/history.c +++ b/bin/ksh/history.c @@ -1,4 +1,4 @@ -/* $OpenBSD: history.c,v 1.85 2024/08/27 18:45:58 op Exp $ */ +/* $OpenBSD: history.c,v 1.86 2024/08/27 19:27:19 op Exp $ */ /* * command history @@ -509,7 +509,6 @@ findhistrel(const char *str) { const char *errstr; int maxhist = histptr - history; - int start = maxhist - 1; int rec; rec = strtonum(str, -maxhist, maxhist, &errstr); @@ -520,7 +519,7 @@ findhistrel(const char *str) return -1; if (rec > 0) return rec - 1; - return start + rec + 1; + return maxhist + rec; } void -- 2.20.1