projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1af8c25
)
fix fwrite return value when full write does not succeed
author
Rich Felker
<dalias@aerifal.cx>
Wed, 20 Jun 2012 19:04:47 +0000
(15:04 -0400)
committer
Rich Felker
<dalias@aerifal.cx>
Wed, 20 Jun 2012 19:04:47 +0000
(15:04 -0400)
src/stdio/fwrite.c
patch
|
blob
|
history
diff --git
a/src/stdio/fwrite.c
b/src/stdio/fwrite.c
index 02908c4b9ad39176d4b5f6591a0b3d72518d20d5..1b8641acadbfc5f9d9c34070ba6b424ee63dabb3 100644
(file)
--- a/
src/stdio/fwrite.c
+++ b/
src/stdio/fwrite.c
@@
-31,7
+31,7
@@
size_t fwrite(const void *src, size_t size, size_t nmemb, FILE *f)
FLOCK(f);
k = __fwritex(src, l, f);
FUNLOCK(f);
- return k==l ? nmemb :
l
/size;
+ return k==l ? nmemb :
k
/size;
}
weak_alias(fwrite, fwrite_unlocked);