Signed-off-by: Xie Rui jerry.xr86@gmail.com
}
memset(static_cast<void*>(buf), 0, write_size);
uint64_t i = 0;
- for (; (i + write_size) <= (unsigned)max_size; i += write_size) {
+ for (; (i + write_size) <= (uint64_t)max_size; i += write_size) {
ret = ::pwrite(fd, static_cast<void*>(buf), write_size, i);
if (ret < 0) {
free(buf);
return -errno;
}
}
- if (i < (unsigned)max_size) {
+ if (i < (uint64_t)max_size) {
ret = ::pwrite(fd, static_cast<void*>(buf), max_size - i, i);
if (ret < 0) {
free(buf);