Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Dec 2008 14:33:34 +0000 (UTC)
From:      Ruslan Ermilov <ru@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r185516 - head/lib/libc/stdio
Message-ID:  <200812011433.mB1EXYDD027385@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ru
Date: Mon Dec  1 14:33:34 2008
New Revision: 185516
URL: http://svn.freebsd.org/changeset/base/185516

Log:
  Fix fread() to return a correct value on platforms where sizeof(int) !=
  sizeof(size_t), i.e. on all 64-bit platforms.
  
  Reported by:	Andrey V. Elsukov
  MFC after:	3 days

Modified:
  head/lib/libc/stdio/fread.c

Modified: head/lib/libc/stdio/fread.c
==============================================================================
--- head/lib/libc/stdio/fread.c	Mon Dec  1 14:15:10 2008	(r185515)
+++ head/lib/libc/stdio/fread.c	Mon Dec  1 14:33:34 2008	(r185516)
@@ -50,7 +50,7 @@ __FBSDID("$FreeBSD$");
 size_t
 fread(void * __restrict buf, size_t size, size_t count, FILE * __restrict fp)
 {
-	int ret;
+	size_t ret;
 
 	FLOCKFILE(fp);
 	ret = __fread(buf, size, count, fp);



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