commit | f374358414812d3e5a45ba75a2b1926693924420 | [log] [tgz] |
---|---|---|
author | Elliott Hughes <enh@google.com> | Wed Jan 21 00:57:06 2015 +0000 |
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | Wed Jan 21 00:57:06 2015 +0000 |
tree | f99c0984eefd85502e7b047c8890ec80e8e4a5d4 | |
parent | a779719d628de5e504dac08d334bc576f3b7fb0a [diff] | |
parent | e69e6458cca9adb9669850ac4055df38a20a70d1 [diff] |
Merge "Fix signed/unsigned comparison that was upsetting clang."
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 @@ /* * 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;