From ccb3f07a141d506eb15c264034b6fbda94fe37f1 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Thu, 22 Apr 2010 22:48:33 +0000 Subject: [PATCH] get_memory_map_etc(): Setting the return value to B_BUFFER_OVERFLOW in the loop causes the function to return before setting the _numEntries. The overflow case is checked at the end of the function anyway, so we can just break out. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36425 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/vm/vm.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/system/kernel/vm/vm.cpp b/src/system/kernel/vm/vm.cpp index dce69bb00c..b301b97035 100644 --- a/src/system/kernel/vm/vm.cpp +++ b/src/system/kernel/vm/vm.cpp @@ -5337,7 +5337,6 @@ get_memory_map_etc(team_id team, const void* address, size_t numBytes, != physicalAddress - table[index].size) { if ((uint32)++index + 1 > numEntries) { // table to small - status = B_BUFFER_OVERFLOW; break; } table[index].address = (void*)physicalAddress;