X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fstdio%2Ffputs.c;h=1cf344f28c6fe88a9394ef64ebe25ea0fbdcf74a;hb=9b132e556774c744f9052581d2d8d0fab417e97c;hp=1112b192c06b49528862fec0168f5af2527d1886;hpb=835f9f950e2f6059532bd9ab9857a856ed21a4fd;p=musl diff --git a/src/stdio/fputs.c b/src/stdio/fputs.c index 1112b192..1cf344f2 100644 --- a/src/stdio/fputs.c +++ b/src/stdio/fputs.c @@ -4,8 +4,7 @@ int fputs(const char *restrict s, FILE *restrict f) { size_t l = strlen(s); - if (!l) return 0; - return (int)fwrite(s, l, 1, f) - 1; + return (fwrite(s, 1, l, f)==l) - 1; } weak_alias(fputs, fputs_unlocked);