mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-19 03:33:43 +03:00
(tee): Adjust fwrite arguments so that the return
value is the number of bytes written.
This commit is contained in:
1 parent
f5f6e466d4
commit
c0042c884d
1 file changed
+1
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user