From: Jim Meyering Date: Mon, 26 Nov 2001 12:16:48 +0000 (+0000) Subject: (cat): Don't test whether the full_write return value (of type size_t) X-Git-Tag: TEXTUTILS-2_0_18~32 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8087128c07af528666a48156743572f15d1267e8;p=thirdparty%2Fcoreutils.git (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. --- 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; }