aboutsummaryrefslogtreecommitdiff
path: root/coreutils/cmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/cmp.c')
-rw-r--r--coreutils/cmp.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/coreutils/cmp.c b/coreutils/cmp.c
index 016158bfe..a569eb3fe 100644
--- a/coreutils/cmp.c
+++ b/coreutils/cmp.c
@@ -21,9 +21,6 @@
21 * in the '-l' case. 21 * in the '-l' case.
22 */ 22 */
23 23
24#include <stdio.h>
25#include <stdlib.h>
26#include <unistd.h>
27#include "busybox.h" 24#include "busybox.h"
28 25
29static FILE *cmp_xfopen_input(const char *filename) 26static FILE *cmp_xfopen_input(const char *filename)
@@ -105,12 +102,12 @@ int cmp_main(int argc, char **argv)
105 c1 = c2; 102 c1 = c2;
106 } 103 }
107 if (c1 == EOF) { 104 if (c1 == EOF) {
108 bb_xferror(fp1, filename1); 105 xferror(fp1, filename1);
109 fmt = fmt_eof; /* Well, no error, so it must really be EOF. */ 106 fmt = fmt_eof; /* Well, no error, so it must really be EOF. */
110 outfile = stderr; 107 outfile = stderr;
111 /* There may have been output to stdout (option -l), so 108 /* There may have been output to stdout (option -l), so
112 * make sure we fflush before writing to stderr. */ 109 * make sure we fflush before writing to stderr. */
113 bb_xfflush_stdout(); 110 xfflush_stdout();
114 } 111 }
115 if (opt_flags != OPT_s) { 112 if (opt_flags != OPT_s) {
116 if (opt_flags == OPT_l) { 113 if (opt_flags == OPT_l) {
@@ -129,8 +126,8 @@ int cmp_main(int argc, char **argv)
129 } 126 }
130 } while (c1 != EOF); 127 } while (c1 != EOF);
131 128
132 bb_xferror(fp1, filename1); 129 xferror(fp1, filename1);
133 bb_xferror(fp2, filename2); 130 xferror(fp2, filename2);
134 131
135 bb_fflush_stdout_and_exit(exit_val); 132 bb_fflush_stdout_and_exit(exit_val);
136} 133}