diff options
Diffstat (limited to 'libbb/print_file.c')
-rw-r--r-- | libbb/print_file.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/libbb/print_file.c b/libbb/print_file.c index b47723454..bfedc5eff 100644 --- a/libbb/print_file.c +++ b/libbb/print_file.c @@ -26,12 +26,9 @@ extern void print_file(FILE *file) { - int c; - - while ((c = getc(file)) != EOF) - putc(c, stdout); - fclose(file); fflush(stdout); + copyfd(fileno(file), fileno(stdout)); + fclose(file); } extern int print_file_by_name(char *filename) |