diff options
Diffstat (limited to 'coreutils/cmp.c')
-rw-r--r-- | coreutils/cmp.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/coreutils/cmp.c b/coreutils/cmp.c index 07858c64e..2b923c845 100644 --- a/coreutils/cmp.c +++ b/coreutils/cmp.c | |||
@@ -96,7 +96,7 @@ int cmp_main(int argc, char **argv) | |||
96 | c1 = c2; | 96 | c1 = c2; |
97 | } | 97 | } |
98 | if (c1 == EOF) { | 98 | if (c1 == EOF) { |
99 | xferror(fp1, filename1); | 99 | die_if_ferror(fp1, filename1); |
100 | fmt = fmt_eof; /* Well, no error, so it must really be EOF. */ | 100 | fmt = fmt_eof; /* Well, no error, so it must really be EOF. */ |
101 | outfile = stderr; | 101 | outfile = stderr; |
102 | /* There may have been output to stdout (option -l), so | 102 | /* There may have been output to stdout (option -l), so |
@@ -107,7 +107,7 @@ int cmp_main(int argc, char **argv) | |||
107 | if (opt & CMP_OPT_l) { | 107 | if (opt & CMP_OPT_l) { |
108 | line_pos = c1; /* line_pos is unused in the -l case. */ | 108 | line_pos = c1; /* line_pos is unused in the -l case. */ |
109 | } | 109 | } |
110 | bb_fprintf(outfile, fmt, filename1, filename2, char_pos, line_pos, c2); | 110 | fprintf(outfile, fmt, filename1, filename2, char_pos, line_pos, c2); |
111 | if (opt) { /* This must be -l since not -s. */ | 111 | if (opt) { /* This must be -l since not -s. */ |
112 | /* If we encountered an EOF, | 112 | /* If we encountered an EOF, |
113 | * the while check will catch it. */ | 113 | * the while check will catch it. */ |
@@ -121,8 +121,8 @@ int cmp_main(int argc, char **argv) | |||
121 | } | 121 | } |
122 | } while (c1 != EOF); | 122 | } while (c1 != EOF); |
123 | 123 | ||
124 | xferror(fp1, filename1); | 124 | die_if_ferror(fp1, filename1); |
125 | xferror(fp2, filename2); | 125 | die_if_ferror(fp2, filename2); |
126 | 126 | ||
127 | bb_fflush_stdout_and_exit(retval); | 127 | fflush_stdout_and_exit(retval); |
128 | } | 128 | } |