X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fstdio%2Fputw.c;h=0ff9d7fbffb98a5d5919a3e8658678095674a3b7;hb=5271ff46b9e983bec5fd9ab79d5aaf096fa54157;hp=137832ee1b66f1fca9725bfe7d9e64026d73f02a;hpb=0b44a0315b47dd8eced9f3b7f31580cf14bbfc01;p=musl diff --git a/src/stdio/putw.c b/src/stdio/putw.c index 137832ee..0ff9d7fb 100644 --- a/src/stdio/putw.c +++ b/src/stdio/putw.c @@ -1,6 +1,7 @@ +#define _GNU_SOURCE #include int putw(int x, FILE *f) { - return fwrite(&x, sizeof x, 1, f) ? x : EOF; + return (int)fwrite(&x, sizeof x, 1, f)-1; }