author | Rich Felker <dalias@aerifal.cx> | 2014年09月04日 22:21:17 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2014年09月04日 22:21:17 -0400 |
commit | 6e2bb7acf42589fb7130b039d0623e2ca42503dd (patch) | |
tree | 7af4719cfa84bc8cf0c6fa73fdca42035eaf03e9 /src/stdio/fputs.c | |
parent | 402611c3ba3be5b3b0486835d98e22ac7ced2722 (diff) | |
download | musl-6e2bb7acf42589fb7130b039d0623e2ca42503dd.tar.gz |
-rw-r--r-- | src/stdio/fputs.c | 4 |
diff --git a/src/stdio/fputs.c b/src/stdio/fputs.c index 1112b192..4737f448 100644 --- a/src/stdio/fputs.c +++ b/src/stdio/fputs.c @@ -3,9 +3,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 (int)fwrite(s, strlen(s), 1, f) - 1; } weak_alias(fputs, fputs_unlocked); |