X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fstdio%2Ffputs.c;h=1cf344f28c6fe88a9394ef64ebe25ea0fbdcf74a;hb=595416b11dfbc82d40a59d0edd7e3b04ba7a2d6d;hp=b41bc8c7c97f157353b55c31d0ea3176bf551f48;hpb=400c5e5c8307a2ebe44ef1f203f5a15669f20347;p=musl diff --git a/src/stdio/fputs.c b/src/stdio/fputs.c index b41bc8c7..1cf344f2 100644 --- a/src/stdio/fputs.c +++ b/src/stdio/fputs.c @@ -1,10 +1,10 @@ #include "stdio_impl.h" +#include 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);