diff --git a/src/stdio/putw.c b/src/stdio/putw.c index a6d2429278a67f3df5061c041fc113b1fd2d350e..0ff9d7fbffb98a5d5919a3e8658678095674a3b7 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; }