diff options
Diffstat (limited to 'code/fe310/gloss/sys_sbrk.c')
-rw-r--r-- | code/fe310/gloss/sys_sbrk.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/code/fe310/gloss/sys_sbrk.c b/code/fe310/gloss/sys_sbrk.c index cc01c8f..ce10c90 100644 --- a/code/fe310/gloss/sys_sbrk.c +++ b/code/fe310/gloss/sys_sbrk.c @@ -28,10 +28,9 @@ _sbrk(ptrdiff_t incr) } /* Don't move the break past the end of the heap */ - if ((brk + incr) < &metal_segment_heap_target_end) { + if ((brk + incr) <= &metal_segment_heap_target_end) { brk += incr; } else { - brk = &metal_segment_heap_target_end; return (void *)-1; } |