summaryrefslogtreecommitdiff
path: root/include/stropts.h
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2016-02-16 13:26:16 -0500
committerRich Felker <dalias@aerifal.cx>2016-02-16 13:26:16 -0500
commit10a17dfbad2c267d885817abc9c7589fc7ff630b (patch)
tree18813bb6680ec2140a595e2b7364d61626a5a1d2 /include/stropts.h
parent9c102700a7b9e743da692d3cb6bfa580fcdd4379 (diff)
downloadmusl-10a17dfbad2c267d885817abc9c7589fc7ff630b.tar.gz
musl-10a17dfbad2c267d885817abc9c7589fc7ff630b.tar.bz2
musl-10a17dfbad2c267d885817abc9c7589fc7ff630b.tar.xz
musl-10a17dfbad2c267d885817abc9c7589fc7ff630b.zip
fix assumption in fputs that fwrite returning 0 implies an error
internally, the idiom of passing nmemb=1 to fwrite and interpreting the return value of fwrite (which is necessarily 0 or 1) as failure/success is fairly widely used. this is not correct, however, when the size argument is unknown and may be zero, since C requires fwrite to return 0 in that special case. previously fwrite always returned nmemb on success, but this was changed for conformance with ISO C by commit 500c6886c654fd45e4926990fee2c61d816be197.
Diffstat (limited to 'include/stropts.h')
0 files changed, 0 insertions, 0 deletions