summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2016-02-15 21:18:52 +0000
committerpfg <pfg@FreeBSD.org>2016-02-15 21:18:52 +0000
commit197e3760ab195e2d3b05357e36b2f8857258d71a (patch)
tree6765e48800a4907b3cb4adcd53d689efd4f85605 /lib/libc/stdio
parent18d5c9d9d562ce2881dd12996fc769c6eb5bdc49 (diff)
downloadFreeBSD-src-197e3760ab195e2d3b05357e36b2f8857258d71a.zip
FreeBSD-src-197e3760ab195e2d3b05357e36b2f8857258d71a.tar.gz
fputs: Return the number of bytes written.
Fix r295631: wrong value. Pointy hat: pfg (me) Pointed out by: bde
Diffstat (limited to 'lib/libc/stdio')
-rw-r--r--lib/libc/stdio/fputs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/stdio/fputs.c b/lib/libc/stdio/fputs.c
index d010979..1f9795a 100644
--- a/lib/libc/stdio/fputs.c
+++ b/lib/libc/stdio/fputs.c
@@ -64,6 +64,6 @@ fputs(const char * __restrict s, FILE * __restrict fp)
retval = __sfvwrite(fp, &uio);
FUNLOCKFILE(fp);
if (retval == 0)
- return (iov.iov_len > INT_MAX ? INT_MAX : uio.uio_resid);
+ return (iov.iov_len > INT_MAX ? INT_MAX : iov.iov_len);
return (retval);
}
OpenPOWER on IntegriCloud