From 8087128c07af528666a48156743572f15d1267e8 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 26 Nov 2001 12:16:48 +0000 Subject: [PATCH] (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. --- src/cat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cat.c b/src/cat.c index 5bddfd039b..3b5d7ed570 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; } -- 2.47.3