summaryrefslogtreecommitdiff
path: root/syscall.c
diff options
context:
space:
mode:
Diffstat (limited to 'syscall.c')
-rw-r--r--syscall.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/syscall.c b/syscall.c
index b0933db..0c4d654 100644
--- a/syscall.c
+++ b/syscall.c
@@ -473,15 +473,15 @@ sys_getpid(void)
int
sys_sbrk(void)
{
- char *r;
int n;
struct proc *cp = curproc[cpu()];
if(fetcharg(0, &n) < 0)
return -1;
- r = growproc(n);
+ if(growproc(n) != 0)
+ return -1;
setupsegs(cp);
- return (int) r;
+ return 0;
}
int