more: smaller version of previous fix
[oweals/busybox.git] / 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();