summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/src/regionextend.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/rtems/src/regionextend.c')
-rw-r--r--cpukit/rtems/src/regionextend.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/cpukit/rtems/src/regionextend.c b/cpukit/rtems/src/regionextend.c
index a198aabebc..15134237ac 100644
--- a/cpukit/rtems/src/regionextend.c
+++ b/cpukit/rtems/src/regionextend.c
@@ -57,8 +57,6 @@ rtems_status_code rtems_region_extend(
if ( !starting_address )
return RTEMS_INVALID_ADDRESS;
- return_status = RTEMS_SUCCESSFUL;
-
_RTEMS_Lock_allocator(); /* to prevent deletion */
the_region = _Region_Get( id, &location );
@@ -76,6 +74,7 @@ rtems_status_code rtems_region_extend(
if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) {
the_region->length += amount_extended;
the_region->maximum_segment_size += amount_extended;
+ return_status = RTEMS_SUCCESSFUL;
} else if ( heap_status == HEAP_EXTEND_ERROR ) {
return_status = RTEMS_INVALID_ADDRESS;
} else if ( heap_status == HEAP_EXTEND_NOT_IMPLEMENTED ) {