Fix signed/unsigned comparison that was upsetting clang.
bionic/libc/stdio/fread.c:86:27: error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned int') [-Werror,-Wsign-compare] Change-Id: Ia7e1e053e0cb13113e8f2eede820be013acbab82
This commit is contained in:
parent
a779719d62
commit
e69e6458cc
@ -83,7 +83,7 @@ fread(void *buf, size_t size, size_t count, FILE *fp)
|
|||||||
/*
|
/*
|
||||||
* Copy data out of the buffer.
|
* 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);
|
memcpy(dst, fp->_p, buffered_bytes);
|
||||||
fp->_p += buffered_bytes;
|
fp->_p += buffered_bytes;
|
||||||
fp->_r -= buffered_bytes;
|
fp->_r -= buffered_bytes;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user