diff options
-rw-r--r-- | src/common/memory.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/common/memory.h b/src/common/memory.h index 949bd8b6..8dc91520 100644 --- a/src/common/memory.h +++ b/src/common/memory.h @@ -99,8 +99,7 @@ class PageAllocator { // Checks whether the page allocator owns the passed-in pointer. // This method exists for testing pursposes only. bool OwnsPointer(const void* p) { - PageHeader* header = last_; - for (header = last_; header; header = header->next) { + for (PageHeader* header = last_; header; header = header->next) { const char* current = reinterpret_cast<char*>(header); if ((p >= current) && (p < current + header->num_pages * page_size_)) return true; |