summaryrefslogtreecommitdiff
path: root/src/cat.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2001-11-26 12:16:48 +0000
committerJim Meyering <jim@meyering.net>2001-11-26 12:16:48 +0000
commit8087128c07af528666a48156743572f15d1267e8 (patch)
tree7c134a8e525842ad14a8981053619daa2f237224 /src/cat.c
parent3cfa2e263a44d3eb286741d8dada5f910bf92ddc (diff)
downloadcoreutils-8087128c07af528666a48156743572f15d1267e8.tar.xz
(cat): Don't test whether the full_write return value (of type size_t)
is less than 0. Reported by Nelson H. F. Beebe, as a warning from Irix 6.5's C compiler.
Diffstat (limited to 'src/cat.c')
-rw-r--r--src/cat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cat.c b/src/cat.c
index 5bddfd039..3b5d7ed57 100644
--- a/src/cat.c
+++ b/src/cat.c
@@ -265,7 +265,7 @@ cat (
unsigned char *wp = outbuf;
do
{
- if (full_write (STDOUT_FILENO, wp, outsize) < 0)
+ if (full_write (STDOUT_FILENO, wp, outsize) != outsize)
error (EXIT_FAILURE, errno, _("write error"));
wp += outsize;
}
@@ -318,7 +318,7 @@ cat (
{
int n_write = bpout - outbuf;
- if (full_write (STDOUT_FILENO, outbuf, n_write) < 0)
+ if (full_write (STDOUT_FILENO, outbuf, n_write) != n_write)
error (EXIT_FAILURE, errno, _("write error"));
bpout = outbuf;
}