]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
more: remove second check for EOF (#2714)
authorThorsten Kukuk <kukuk@suse.com>
Tue, 26 Mar 2024 09:50:30 +0000 (10:50 +0100)
committerThorsten Kukuk <kukuk@suse.com>
Tue, 26 Mar 2024 09:50:30 +0000 (10:50 +0100)
The second EOF check (c == EOF) will never be reached.

Signed-off-by: Thorsten Kukuk <kukuk@suse.com>
text-utils/more.c

index 26a08e3370fdd1a4d682156a651161708d96621e..1badf67d55dbc59fe95e7f1e4b5a5fd3bfd3de94 100644 (file)
@@ -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) {