svn commit: r295638 - head/lib/libc/stdio
Pedro F. Giffuni
pfg at FreeBSD.org
Mon Feb 15 21:18:53 UTC 2016
Author: pfg
Date: Mon Feb 15 21:18:52 2016
New Revision: 295638
URL: https://svnweb.freebsd.org/changeset/base/295638
Log:
fputs: Return the number of bytes written.
Fix r295631: wrong value.
Pointy hat: pfg (me)
Pointed out by: bde
Modified:
head/lib/libc/stdio/fputs.c
Modified: head/lib/libc/stdio/fputs.c
==============================================================================
--- head/lib/libc/stdio/fputs.c Mon Feb 15 20:27:16 2016 (r295637)
+++ head/lib/libc/stdio/fputs.c Mon Feb 15 21:18:52 2016 (r295638)
@@ -64,6 +64,6 @@ fputs(const char * __restrict s, FILE *
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);
}
More information about the svn-src-head
mailing list