more: smaller version of previous fix
authorDenys Vlasenko <dvlasenk@redhat.com>
Mon, 13 Dec 2010 13:31:59 +0000 (14:31 +0100)
committerDenys Vlasenko <dvlasenk@redhat.com>
Mon, 13 Dec 2010 13:31:59 +0000 (14:31 +0100)
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
util-linux/more.c

index ecac928215a0157c58c844bfa628e51b0d7853d6..c424a0e4b52af81dccbad7bd55e11142f55c84f8 100644 (file)
@@ -191,9 +191,7 @@ int more_main(int argc UNUSED_PARAM, char **argv)
                        }
                        /* My small mind cannot fathom backspaces and UTF-8 */
                        putchar(c);
-
-                       if (ferror(stdout)) /* if tty was destroyed (closed xterm, etc) */
-                               goto end;
+                       die_if_ferror_stdout(); /* if tty was destroyed (closed xterm, etc) */
                }
                fclose(file);
                fflush_all();