From: Thorsten Kukuk Date: Tue, 26 Mar 2024 09:50:30 +0000 (+0100) Subject: more: remove second check for EOF (#2714) X-Git-Tag: v2.42-start~474^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=81184ad44f536f7f66175ef59fe8472760357fe8;p=thirdparty%2Futil-linux.git more: remove second check for EOF (#2714) The second EOF check (c == EOF) will never be reached. Signed-off-by: Thorsten Kukuk --- 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) {