diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-08-01 18:18:26 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-08-01 18:18:26 +0000 |
commit | fb29a8de4ae2114009d861a1a3cdd762d1ec19e8 (patch) | |
tree | 8894ac538f8b5db316212f1356996b4a117ea408 /cpukit/score/inline/rtems/score/heap.inl | |
parent | 2009-08-01 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-fb29a8de4ae2114009d861a1a3cdd762d1ec19e8.tar.bz2 |
2009-08-01 Joel Sherrill <joel.sherrill@OARcorp.com>
* score/inline/rtems/score/heap.inl, score/src/heapresizeblock.c:
Simplify routine.
Diffstat (limited to 'cpukit/score/inline/rtems/score/heap.inl')
-rw-r--r-- | cpukit/score/inline/rtems/score/heap.inl | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/cpukit/score/inline/rtems/score/heap.inl b/cpukit/score/inline/rtems/score/heap.inl index b8bb124423..f080ed7fdc 100644 --- a/cpukit/score/inline/rtems/score/heap.inl +++ b/cpukit/score/inline/rtems/score/heap.inl @@ -238,10 +238,13 @@ RTEMS_INLINE_ROUTINE void _Heap_Align_up_uptr ( uint32_t alignment ) { + _H_uptr_t remainder; _H_uptr_t v = *value; - uint32_t a = alignment; - _H_uptr_t r = v % a; - *value = r ? v - r + a : v; + + remainder = v % alignment; + + if ( remainder ) + *value = v - remainder + alignment; } /** |