summaryrefslogtreecommitdiffstats
path: root/libc
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2015-01-21 00:57:06 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-01-21 00:57:06 +0000
commitf374358414812d3e5a45ba75a2b1926693924420 (patch)
treef99c0984eefd85502e7b047c8890ec80e8e4a5d4 /libc
parenta779719d628de5e504dac08d334bc576f3b7fb0a (diff)
parente69e6458cca9adb9669850ac4055df38a20a70d1 (diff)
downloadbionic-f374358414812d3e5a45ba75a2b1926693924420.zip
bionic-f374358414812d3e5a45ba75a2b1926693924420.tar.gz
bionic-f374358414812d3e5a45ba75a2b1926693924420.tar.bz2
Merge "Fix signed/unsigned comparison that was upsetting clang."
Diffstat (limited to 'libc')
-rw-r--r--libc/stdio/fread.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/stdio/fread.c b/libc/stdio/fread.c
index 9e5758f..baf62b9 100644
--- a/libc/stdio/fread.c
+++ b/libc/stdio/fread.c
@@ -83,7 +83,7 @@ fread(void *buf, size_t size, size_t count, FILE *fp)
/*
* Copy data out of the buffer.
*/
- size_t buffered_bytes = MIN(fp->_r, total);
+ size_t buffered_bytes = MIN((size_t) fp->_r, total);
memcpy(dst, fp->_p, buffered_bytes);
fp->_p += buffered_bytes;
fp->_r -= buffered_bytes;