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);
}
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"