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

Reply via email to