svn commit: r185516 - head/lib/libc/stdio

Ruslan Ermilov ru at FreeBSD.org
Mon Dec 1 06:33:35 PST 2008


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);


More information about the svn-src-head mailing list