From e95f37bb696f1b62cf4e5093f875be5c5483cb1f Mon Sep 17 00:00:00 2001 From: Ruslan Ermilov Date: Mon, 1 Dec 2008 14:33:34 +0000 Subject: [PATCH] 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 --- lib/libc/stdio/fread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libc/stdio/fread.c b/lib/libc/stdio/fread.c index 6ddfca6a2d5..851713be461 100644 --- a/lib/libc/stdio/fread.c +++ b/lib/libc/stdio/fread.c @@ -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);