(tee): Adjust fwrite arguments so that the return
authorJim Meyering <jim@meyering.net>
Tue, 23 Sep 2003 07:51:02 +0000 (07:51 +0000)
committerJim Meyering <jim@meyering.net>
Tue, 23 Sep 2003 07:51:02 +0000 (07:51 +0000)
value is the number of bytes written.

src/tee.c

index a45e4bf..b8df35e 100644 (file)
--- a/src/tee.c
+++ b/src/tee.c
@@ -210,7 +210,7 @@ tee (int nfiles, const char **files)
         Standard output is the first one.  */
       for (i = 0; i <= nfiles; i++)
        if (descriptors[i]
-           && fwrite (buffer, bytes_read, 1, descriptors[i]) != bytes_read)
+           && fwrite (buffer, 1, bytes_read, descriptors[i]) != bytes_read)
          {
            error (0, errno, "%s", files[i]);
            descriptors[i] = NULL;