diff options
Diffstat (limited to 'src/cksum.c')
-rw-r--r-- | src/cksum.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/cksum.c b/src/cksum.c index 0c47243f3..0a3a80d0e 100644 --- a/src/cksum.c +++ b/src/cksum.c @@ -109,6 +109,7 @@ main (void) # include <getopt.h> # include "long-options.h" +# include "die.h" # include "error.h" /* Number of bytes to read at once. */ @@ -213,7 +214,7 @@ cksum (const char *file, bool print_name) unsigned char *cp = buf; if (length + bytes_read < length) - error (EXIT_FAILURE, 0, _("%s: file too long"), quotef (file)); + die (EXIT_FAILURE, 0, _("%s: file too long"), quotef (file)); length += bytes_read; while (bytes_read--) crc = (crc << 8) ^ crctab[((crc >> 24) ^ *cp++) & 0xFF]; @@ -248,7 +249,7 @@ cksum (const char *file, bool print_name) printf ("%u %s\n", (unsigned int) crc, hp); if (ferror (stdout)) - error (EXIT_FAILURE, errno, "-: %s", _("write error")); + die (EXIT_FAILURE, errno, "-: %s", _("write error")); return true; } @@ -311,7 +312,7 @@ main (int argc, char **argv) } if (have_read_stdin && fclose (stdin) == EOF) - error (EXIT_FAILURE, errno, "-"); + die (EXIT_FAILURE, errno, "-"); return ok ? EXIT_SUCCESS : EXIT_FAILURE; } |