summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/heapalignupuptr.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/score/src/heapalignupuptr.c')
-rw-r--r--cpukit/score/src/heapalignupuptr.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/cpukit/score/src/heapalignupuptr.c b/cpukit/score/src/heapalignupuptr.c
index dbfe0f83cb..966d5d8649 100644
--- a/cpukit/score/src/heapalignupuptr.c
+++ b/cpukit/score/src/heapalignupuptr.c
@@ -1,3 +1,4 @@
+#if 0
/*
* Heap Handler
*
@@ -23,18 +24,17 @@
* path explosion where it is used. This makes full test coverage more
* difficult.
*/
-void _Heap_Align_up_uptr (
- _H_uptr_t *value,
- uint32_t alignment
+uintptr_t _Heap_Align_up(
+ uintptr_t value,
+ uintptr_t alignment
)
{
- _H_uptr_t remainder;
- _H_uptr_t v = *value;
+ uintptr_t remainder = value % alignment;
- remainder = v % alignment;
-
- if ( remainder )
- *value = v - remainder + alignment;
+ if ( remainder != 0 ) {
+ return value - remainder + alignment;
+ } else {
+ return value;
+ }
}
-
-
+#endif