Trust the compiler to do optimize simple stuff like this. This also
helps to avoid stupid mistakes. The driver works again, though things are still not stable. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26605 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -177,7 +177,7 @@ do_io(void* data, IOOperation* operation)
|
||||
const iovec& vec = operation->Vecs()[i];
|
||||
addr_t base = (addr_t)vec.iov_base;
|
||||
size_t length = vec.iov_len;
|
||||
size_t pageOffset = base & ~(B_PAGE_SIZE - 1);
|
||||
size_t pageOffset = base % B_PAGE_SIZE;
|
||||
|
||||
while (length > 0) {
|
||||
size_t toCopy = min_c(length, B_PAGE_SIZE - pageOffset);
|
||||
|
||||
Reference in New Issue
Block a user