[haiku-commits] haiku: hrev43458 - src/system/runtime_loader

  • From: mmlr@xxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 10 Dec 2011 19:09:50 +0100 (CET)

hrev43458 adds 1 changeset to branch 'master'
old head: 82929f8a76b4a5f185f9f39cbec3eb42ace7fc06
new head: 80e6a84bf008b3479413d37737f1889bd2a02905

----------------------------------------------------------------------------

80e6a84: Fix alignment mask, sorry for the noise.

                                            [ Michael Lotz <mmlr@xxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev43458
Commit:      80e6a84bf008b3479413d37737f1889bd2a02905
URL:         http://cgit.haiku-os.org/haiku/commit/?id=80e6a84
Author:      Michael Lotz <mmlr@xxxxxxxx>
Date:        Sat Dec 10 18:09:30 2011 UTC

----------------------------------------------------------------------------

1 files changed, 1 insertions(+), 1 deletions(-)
src/system/runtime_loader/heap.cpp |    2 +-

----------------------------------------------------------------------------

diff --git a/src/system/runtime_loader/heap.cpp 
b/src/system/runtime_loader/heap.cpp
index 61a815d..bb6e880 100644
--- a/src/system/runtime_loader/heap.cpp
+++ b/src/system/runtime_loader/heap.cpp
@@ -323,7 +323,7 @@ void *
 memalign(size_t alignment, size_t size)
 {
        // pseudo alignment by just upping the size
-       size = (size + alignment - 1) & ~alignment;
+       size = (size + alignment - 1) & ~(alignment - 1);
        return malloc(size);
 }
 


Other related posts: