summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2002-10-06 15:48:49 +0000
committerJim Meyering <jim@meyering.net>2002-10-06 15:48:49 +0000
commit00ebca59b7e8963e44180cbf3a0bdc22f6d67ffd (patch)
treea5c95bfe432dbecc3c01db819b681a936923638e /src
parentf99d9f8109931798aa63c578b226f529a3578fa0 (diff)
downloadcoreutils-00ebca59b7e8963e44180cbf3a0bdc22f6d67ffd.tar.xz
(simple_cat, cat): Adapt to new safe_read ABI.
Diffstat (limited to 'src')
-rw-r--r--src/cat.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cat.c b/src/cat.c
index 4c42f44df..d547084ef 100644
--- a/src/cat.c
+++ b/src/cat.c
@@ -159,7 +159,7 @@ simple_cat (
int bufsize)
{
/* Actual number of characters read, and therefore written. */
- ssize_t n_read;
+ size_t n_read;
/* Loop until the end of the file. */
@@ -168,7 +168,7 @@ simple_cat (
/* Read a block of input. */
n_read = safe_read (input_desc, buf, bufsize);
- if (n_read < 0)
+ if (n_read == SAFE_READ_ERROR)
{
error (0, errno, "%s", infile);
exit_status = 1;
@@ -233,7 +233,7 @@ cat (
char *bpout;
/* Number of characters read by the last read call. */
- ssize_t n_read;
+ size_t n_read;
/* Determines how many consecutive newlines there have been in the
input. 0 newlines makes NEWLINES -1, 1 newline makes NEWLINES 1,
@@ -328,7 +328,7 @@ cat (
/* Read more input into INBUF. */
n_read = safe_read (input_desc, inbuf, insize);
- if (n_read < 0)
+ if (n_read == SAFE_READ_ERROR)
{
error (0, errno, "%s", infile);
exit_status = 1;