summaryrefslogtreecommitdiff
path: root/code/fe310/gloss
diff options
context:
space:
mode:
Diffstat (limited to 'code/fe310/gloss')
-rw-r--r--code/fe310/gloss/sys_sbrk.c3
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;
}