nvme_disk: Add missing cast to off_t.
Should fix the 64-bit build.
This commit is contained in:
@@ -424,7 +424,7 @@ nvme_disk_read(void* cookie, off_t pos, void* buffer, size_t* length)
|
||||
// The "rounded_len" will be the actual transferred length, but
|
||||
// of course it will contain the padding.
|
||||
*length = std::min(*length, (size_t)std::max((off_t)0,
|
||||
rounded_len - (off_t)(pos - rounded_pos)));
|
||||
(off_t)rounded_len - (off_t)(pos - rounded_pos)));
|
||||
if (*length == 0)
|
||||
return status;
|
||||
}
|
||||
@@ -499,7 +499,7 @@ nvme_disk_write(void* cookie, off_t pos, const void* buffer, size_t* length)
|
||||
&rounded_len, true);
|
||||
if (status != B_OK) {
|
||||
*length = std::min(*length, (size_t)std::max((off_t)0,
|
||||
rounded_len - (off_t)(pos - rounded_pos)));
|
||||
(off_t)rounded_len - (off_t)(pos - rounded_pos)));
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user