summaryrefslogtreecommitdiff
path: root/src/stdio
diff options
context:
space:
mode:
Diffstat (limited to 'src/stdio')
-rw-r--r--src/stdio/putw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stdio/putw.c b/src/stdio/putw.c
index a6d24292..0ff9d7fb 100644
--- a/src/stdio/putw.c
+++ b/src/stdio/putw.c
@@ -3,5 +3,5 @@
int putw(int x, FILE *f)
{
- return fwrite(&x, sizeof x, 1, f) ? x : EOF;
+ return (int)fwrite(&x, sizeof x, 1, f)-1;
}