Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Feb 2016 21:18:52 +0000 (UTC)
From:      "Pedro F. Giffuni" <pfg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r295638 - head/lib/libc/stdio
Message-ID:  <201602152118.u1FLIq5U023191@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201602152118.u1FLIq5U023191>