* Fix some coding style issues

* Stumbled upon a possible bug while trying to understand the reuse of large
  allocations. The "first" variable was always set to the current index at the
  end of the loop, even if it was already set. This should have caused that
  the success condition to never be reached.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23866 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Lotz
2008-02-04 21:53:57 +00:00
parent bd6a90a7e2
commit 9a2cc3ad3f
+1 -2
View File
@@ -477,12 +477,11 @@ memalign(size_t alignment, size_t size)
if (first > 0) { if (first > 0) {
if ((1 + i - first) * B_PAGE_SIZE > size) if ((1 + i - first) * B_PAGE_SIZE > size)
break; break;
} } else
first = i; first = i;
} }
if (first > -1) if (first > -1)
address = (void *)(heap_base + first * B_PAGE_SIZE); address = (void *)(heap_base + first * B_PAGE_SIZE);
} }
if (address == NULL) if (address == NULL)
address = raw_alloc(size, bin_index); address = raw_alloc(size, bin_index);