musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src/stdio/fputs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stdio/fputs.c')
-rw-r--r--src/stdio/fputs.c 4
1 files changed, 1 insertions, 3 deletions
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);
generated by cgit v1.2.1 (git 2.18.0) at 2025年09月12日 21:22:14 +0000

AltStyle によって変換されたページ (->オリジナル) /