X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fstdio%2Ffwrite.c;h=1b8641acadbfc5f9d9c34070ba6b424ee63dabb3;hb=babf820180368f00742ec65b2050a82380d7c542;hp=02908c4b9ad39176d4b5f6591a0b3d72518d20d5;hpb=e3cd6c5c265cd481db6e0c5b529855d99f0bda30;p=musl diff --git a/src/stdio/fwrite.c b/src/stdio/fwrite.c index 02908c4b..1b8641ac 100644 --- 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);