From b0e1d28d2ba8381183bfe392daabcb9d89b9b8d6 Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Sun, 31 Aug 2014 11:00:21 +0200 Subject: [PATCH] USB: Cleanup hardcoded bitmap size. --- src/add-ons/kernel/bus_managers/usb/PhysicalMemoryAllocator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/add-ons/kernel/bus_managers/usb/PhysicalMemoryAllocator.cpp b/src/add-ons/kernel/bus_managers/usb/PhysicalMemoryAllocator.cpp index 7ec36484af..994e87760c 100644 --- a/src/add-ons/kernel/bus_managers/usb/PhysicalMemoryAllocator.cpp +++ b/src/add-ons/kernel/bus_managers/usb/PhysicalMemoryAllocator.cpp @@ -141,7 +141,7 @@ PhysicalMemoryAllocator::Allocate(size_t size, void **logicalAddress, return B_NO_MEMORY; } - for (int32 i = 0; i < 64; i++) { + for (size_t i = 0; i < sizeof(fDebugUseMap) * 8; i++) { uint64 mask = 1LL << i; if ((fDebugUseMap & mask) == 0) { fDebugUseMap |= mask;