From 2ce9db216050e6ee58b5d62fa8e0de9e459f5eb9 Mon Sep 17 00:00:00 2001 From: Thorsten Kukuk Date: Tue, 26 Mar 2024 10:50:30 +0100 Subject: [PATCH] more: remove second check for EOF (#2714) The second EOF check (c == EOF) will never be reached. Signed-off-by: Thorsten Kukuk (cherry picked from commit 81184ad44f536f7f66175ef59fe8472760357fe8) --- text-utils/more.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/text-utils/more.c b/text-utils/more.c index 26a08e337..1badf67d5 100644 --- a/text-utils/more.c +++ b/text-utils/more.c @@ -626,9 +626,6 @@ static int get_line(struct more_control *ctl, int *length) *p++ = 'L'; column += 2; ctl->is_paused = 1; - } else if (c == EOF) { - *length = p - ctl->line_buf; - return column; } else { #ifdef HAVE_WIDECHAR if (ctl->fold_long_lines && MB_CUR_MAX > 1) { -- 2.47.3