X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fstdio%2Ffputs.c;h=1cf344f28c6fe88a9394ef64ebe25ea0fbdcf74a;hb=2fab90a71acd3698954c08b9062db67188443dd7;hp=4737f448e934ac18465c4f827b479edabcc180d4;hpb=6e2bb7acf42589fb7130b039d0623e2ca42503dd;p=musl diff --git a/src/stdio/fputs.c b/src/stdio/fputs.c index 4737f448..1cf344f2 100644 --- a/src/stdio/fputs.c +++ b/src/stdio/fputs.c @@ -3,7 +3,8 @@ int fputs(const char *restrict s, FILE *restrict f) { - return (int)fwrite(s, strlen(s), 1, f) - 1; + size_t l = strlen(s); + return (fwrite(s, 1, l, f)==l) - 1; } weak_alias(fputs, fputs_unlocked);