summaryrefslogtreecommitdiff
path: root/src/cat.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1996-03-24 16:59:11 +0000
committerJim Meyering <jim@meyering.net>1996-03-24 16:59:11 +0000
commit818d29db9bee7b3a87d677bb4bdd520b30924fad (patch)
tree4994682f8e7be50460c142ee85321f4e5f3a29e6 /src/cat.c
parent47f70113d4342682a6408f85337676f1ccb7e8fe (diff)
downloadcoreutils-818d29db9bee7b3a87d677bb4bdd520b30924fad.tar.xz
Call error with EXIT_FAILURE (rather than `1') as first actual parameter.
Diffstat (limited to 'src/cat.c')
-rw-r--r--src/cat.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/cat.c b/src/cat.c
index f899e117b..54f5b1a28 100644
--- a/src/cat.c
+++ b/src/cat.c
@@ -163,7 +163,7 @@ simple_cat (
/* Write this block out. */
if (full_write (output_desc, buf, n_read) < 0)
- error (1, errno, _("write error"));
+ error (EXIT_FAILURE, errno, _("write error"));
}
}
@@ -244,7 +244,7 @@ cat (
do
{
if (full_write (output_desc, wp, outsize) < 0)
- error (1, errno, _("write error"));
+ error (EXIT_FAILURE, errno, _("write error"));
wp += outsize;
}
while (bpout - wp >= outsize);
@@ -297,7 +297,7 @@ cat (
int n_write = bpout - outbuf;
if (full_write (output_desc, outbuf, n_write) < 0)
- error (1, errno, _("write error"));
+ error (EXIT_FAILURE, errno, _("write error"));
bpout = outbuf;
}
@@ -591,7 +591,7 @@ main (int argc, char **argv)
/* Get device, i-node number, and optimal blocksize of output. */
if (fstat (output_desc, &stat_buf) < 0)
- error (1, errno, _("standard output"));
+ error (EXIT_FAILURE, errno, _("standard output"));
outsize = ST_BLKSIZE (stat_buf);
/* Input file can be output file for non-regular files.
@@ -716,9 +716,9 @@ main (int argc, char **argv)
while (++argind < argc);
if (have_read_stdin && close (0) < 0)
- error (1, errno, "-");
+ error (EXIT_FAILURE, errno, "-");
if (close (1) < 0)
- error (1, errno, _("write error"));
+ error (EXIT_FAILURE, errno, _("write error"));
exit (exit_status == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
}