(tee): Adjust fwrite arguments so that the return

value is the number of bytes written.
This commit is contained in:
Jim Meyering committed 2003-09-23 07:51:02 +00:00
1 parent f5f6e466d4
commit c0042c884d
1 file changed
+1 -1
+1 -1
View File
@@ -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;