diff options
Diffstat (limited to 'src/wc.c')
-rw-r--r-- | src/wc.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -28,6 +28,7 @@ #include "system.h" #include "argv-iter.h" +#include "die.h" #include "error.h" #include "fadvise.h" #include "mbchar.h" @@ -707,8 +708,8 @@ main (int argc, char **argv) { stream = fopen (files_from, "r"); if (stream == NULL) - error (EXIT_FAILURE, errno, _("cannot open %s for reading"), - quoteaf (files_from)); + die (EXIT_FAILURE, errno, _("cannot open %s for reading"), + quoteaf (files_from)); } /* Read the file list into RAM if we can detect its size and that @@ -721,8 +722,8 @@ main (int argc, char **argv) read_tokens = true; readtokens0_init (&tok); if (! readtokens0 (stream, &tok) || fclose (stream) != 0) - error (EXIT_FAILURE, 0, _("cannot read file names from %s"), - quoteaf (files_from)); + die (EXIT_FAILURE, 0, _("cannot read file names from %s"), + quoteaf (files_from)); files = tok.tok; nfiles = tok.n_tok; ai = argv_iter_init_argv (files); @@ -827,7 +828,7 @@ main (int argc, char **argv) free (fstatus); if (have_read_stdin && close (STDIN_FILENO) != 0) - error (EXIT_FAILURE, errno, "-"); + die (EXIT_FAILURE, errno, "-"); return ok ? EXIT_SUCCESS : EXIT_FAILURE; } |