summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--c/src/exec/libcsupport/src/malloc.c5
-rw-r--r--c/src/lib/libc/malloc.c5
-rw-r--r--cpukit/libcsupport/src/malloc.c5
3 files changed, 9 insertions, 6 deletions
diff --git a/c/src/exec/libcsupport/src/malloc.c b/c/src/exec/libcsupport/src/malloc.c
index b93950131a..e8387d4364 100644
--- a/c/src/exec/libcsupport/src/malloc.c
+++ b/c/src/exec/libcsupport/src/malloc.c
@@ -77,7 +77,7 @@ void RTEMS_Malloc_Initialize(
if (!starting_address) {
u32_address = (unsigned int)sbrk(length);
- if (u32_address == -1) {
+ if (u32_address == (rtems_unsigned32) -1) {
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
/* DOES NOT RETURN!!! */
}
@@ -165,7 +165,8 @@ void *malloc(
the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount);
- if (((rtems_unsigned32)starting_address = (void *)sbrk(the_size)) == -1)
+ if (((rtems_unsigned32)starting_address = (void *)sbrk(the_size))
+ == (rtems_unsigned32) -1)
return (void *) 0;
status = rtems_region_extend(
diff --git a/c/src/lib/libc/malloc.c b/c/src/lib/libc/malloc.c
index b93950131a..e8387d4364 100644
--- a/c/src/lib/libc/malloc.c
+++ b/c/src/lib/libc/malloc.c
@@ -77,7 +77,7 @@ void RTEMS_Malloc_Initialize(
if (!starting_address) {
u32_address = (unsigned int)sbrk(length);
- if (u32_address == -1) {
+ if (u32_address == (rtems_unsigned32) -1) {
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
/* DOES NOT RETURN!!! */
}
@@ -165,7 +165,8 @@ void *malloc(
the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount);
- if (((rtems_unsigned32)starting_address = (void *)sbrk(the_size)) == -1)
+ if (((rtems_unsigned32)starting_address = (void *)sbrk(the_size))
+ == (rtems_unsigned32) -1)
return (void *) 0;
status = rtems_region_extend(
diff --git a/cpukit/libcsupport/src/malloc.c b/cpukit/libcsupport/src/malloc.c
index b93950131a..e8387d4364 100644
--- a/cpukit/libcsupport/src/malloc.c
+++ b/cpukit/libcsupport/src/malloc.c
@@ -77,7 +77,7 @@ void RTEMS_Malloc_Initialize(
if (!starting_address) {
u32_address = (unsigned int)sbrk(length);
- if (u32_address == -1) {
+ if (u32_address == (rtems_unsigned32) -1) {
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
/* DOES NOT RETURN!!! */
}
@@ -165,7 +165,8 @@ void *malloc(
the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount);
- if (((rtems_unsigned32)starting_address = (void *)sbrk(the_size)) == -1)
+ if (((rtems_unsigned32)starting_address = (void *)sbrk(the_size))
+ == (rtems_unsigned32) -1)
return (void *) 0;
status = rtems_region_extend(