projects
/
platform
/
upstream
/
coreutils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
5cc42f7
)
avoid a -Wsign-compare warning
author
Jim Meyering
<meyering@redhat.com>
Fri, 27 Jun 2008 14:34:00 +0000
(16:34 +0200)
committer
Jim Meyering
<meyering@redhat.com>
Fri, 27 Jun 2008 14:34:00 +0000
(16:34 +0200)
* src/tee.c (tee_files): Swap fwrite's size/n_elem args and
compare the return value against "1".
src/tee.c
patch
|
blob
|
history
diff --git
a/src/tee.c
b/src/tee.c
index 162455c536442afe067ced1870b3da8077fc2d97..4e46aabb598e64612ed91e6b3de45df926d53be8 100644
(file)
--- a/
src/tee.c
+++ b/
src/tee.c
@@
-190,7
+190,7
@@
tee_files (int nfiles, const char **files)
Standard output is the first one. */
for (i = 0; i <= nfiles; i++)
if (descriptors[i]
- && fwrite (buffer,
1, bytes_read, descriptors[i]) != bytes_read
)
+ && fwrite (buffer,
bytes_read, 1, descriptors[i]) != 1
)
{
error (0, errno, "%s", files[i]);
descriptors[i] = NULL;