]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(cat): Don't test whether the full_write return value (of type size_t)
authorJim Meyering <jim@meyering.net>
Mon, 26 Nov 2001 12:16:48 +0000 (12:16 +0000)
committerJim Meyering <jim@meyering.net>
Mon, 26 Nov 2001 12:16:48 +0000 (12:16 +0000)
is less than 0.  Reported by Nelson H. F. Beebe,
as a warning from Irix 6.5's C compiler.

src/cat.c

index 5bddfd039bd69b0ba19415a0128745654c71cebc..3b5d7ed5703a1e05b22a918b89102927eb3e27c4 100644 (file)
--- 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;
                }