diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2006-09-01 15:37:47 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2006-09-01 15:37:47 +0000 |
commit | b3ee778ea92b4a51ab415ee94999ae59cecda5cd (patch) | |
tree | 91c1ffd69758cd6338759ae1355c280ae66539ff /cpukit/libcsupport/src/malloc.c | |
parent | 2006-08-30 Joel Sherrill <joel@OARcorp.com> (diff) | |
download | rtems-b3ee778ea92b4a51ab415ee94999ae59cecda5cd.tar.bz2 |
2006-09-01 Joel Sherrill <joel@OARcorp.com>
* libcsupport/src/malloc.c, libnetworking/rtems/rtems_glue.c,
libnetworking/sys/mbuf.h: Remove warnings -- use uintptr_t or
properly sized integers.
Diffstat (limited to 'cpukit/libcsupport/src/malloc.c')
-rw-r--r-- | cpukit/libcsupport/src/malloc.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/cpukit/libcsupport/src/malloc.c b/cpukit/libcsupport/src/malloc.c index 8f961cf8f3..9220eea1a3 100644 --- a/cpukit/libcsupport/src/malloc.c +++ b/cpukit/libcsupport/src/malloc.c @@ -111,8 +111,8 @@ void RTEMS_Malloc_Initialize( { rtems_status_code status; void *starting_address; - uint32_t old_address; - uint32_t u32_address; + uintptr_t old_address; + uintptr_t uaddress; /* * Initialize the garbage collection list to start with nothing on it. @@ -129,25 +129,25 @@ void RTEMS_Malloc_Initialize( RTEMS_Malloc_Sbrk_amount = sbrk_amount; if (!starting_address) { - u32_address = (unsigned int)sbrk(length); + uaddress = (uintptr_t)sbrk(length); - if (u32_address == (uint32_t ) -1) { + if (uaddress == (uintptr_t) -1) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); /* DOES NOT RETURN!!! */ } - if (u32_address & (CPU_HEAP_ALIGNMENT-1)) { - old_address = u32_address; - u32_address = (u32_address + CPU_HEAP_ALIGNMENT) & ~(CPU_HEAP_ALIGNMENT-1); + if (uaddress & (CPU_HEAP_ALIGNMENT-1)) { + old_address = uaddress; + uaddress = (uaddress + CPU_HEAP_ALIGNMENT) & ~(CPU_HEAP_ALIGNMENT-1); /* * adjust the length by whatever we aligned by */ - length -= u32_address - old_address; + length -= uaddress - old_address; } - starting_address = (void *)u32_address; + starting_address = (void *)uaddress; } /* |