aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2012-05-17 10:26:31 -0700
committerH. Peter Anvin <hpa@zytor.com>2012-05-17 10:26:31 -0700
commitfd2bb9d4b97d18ba75d5e7882c720df598d764f6 (patch)
treed677c08f1fc5429b886d7f4e79683e5c0abe7c05
parent8a95f4d87fd3adf59c68bbd8ba85830e511e59ea (diff)
downloadklibc-fd2bb9d4b97d18ba75d5e7882c720df598d764f6.tar.gz
[klibc] fwrite: fix the implementation of _IONBF
The _IONBF implementation was a duplicate of _IOFBF, which is obviously incorrect. Actually make sure we flush after each write. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--usr/klibc/stdio/fwrite.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr/klibc/stdio/fwrite.c b/usr/klibc/stdio/fwrite.c
index d167257ea778ba..5d2c3f01343eb9 100644
--- a/usr/klibc/stdio/fwrite.c
+++ b/usr/klibc/stdio/fwrite.c
@@ -82,8 +82,8 @@ size_t _fwrite(const void *buf, size_t count, FILE *file)
case _IONBF:
default:
- pf_len = 0;
- pu_len = count;
+ pf_len = count;
+ pu_len = 0;
break;
}