aboutsummaryrefslogtreecommitdiff
path: root/coreutils/head.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/head.c')
-rw-r--r--coreutils/head.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/coreutils/head.c b/coreutils/head.c
index 2e9000df4..d732461f7 100644
--- a/coreutils/head.c
+++ b/coreutils/head.c
@@ -112,7 +112,7 @@ int head_main(int argc, char **argv)
112#endif 112#endif
113 113
114 do { 114 do {
115 fp = bb_wfopen_input(*argv); 115 fp = fopen_or_warn_stdin(*argv);
116 if (fp) { 116 if (fp) {
117 if (fp == stdin) { 117 if (fp == stdin) {
118 *argv = (char *) bb_msg_standard_input; 118 *argv = (char *) bb_msg_standard_input;
@@ -127,7 +127,7 @@ int head_main(int argc, char **argv)
127 } 127 }
128 putchar(c); 128 putchar(c);
129 } 129 }
130 if (bb_fclose_nonstdin(fp)) { 130 if (fclose_if_not_stdin(fp)) {
131 bb_perror_msg("%s", *argv); /* Avoid multibyte problems. */ 131 bb_perror_msg("%s", *argv); /* Avoid multibyte problems. */
132 retval = EXIT_FAILURE; 132 retval = EXIT_FAILURE;
133 } 133 }