summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/i386/brk.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/i386/brk.c')
-rw-r--r--sysdeps/unix/sysv/linux/i386/brk.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/sysdeps/unix/sysv/linux/i386/brk.c b/sysdeps/unix/sysv/linux/i386/brk.c
index 5b9a0ce735..6e55a1bd45 100644
--- a/sysdeps/unix/sysv/linux/i386/brk.c
+++ b/sysdeps/unix/sysv/linux/i386/brk.c
@@ -1,5 +1,5 @@
/* brk system call for Linux/i386.
- Copyright (C) 1995-2015 Free Software Foundation, Inc.
+ Copyright (C) 1995-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -31,19 +31,11 @@ weak_alias (__curbrk, ___brk_addr)
int
__brk (void *addr)
{
- void *newbrk;
-
INTERNAL_SYSCALL_DECL (err);
- newbrk = (void *) INTERNAL_SYSCALL (brk, err, 1, addr);
-
+ void *newbrk = (void *) INTERNAL_SYSCALL (brk, err, 1, addr);
__curbrk = newbrk;
-
if (newbrk < addr)
- {
- __set_errno (ENOMEM);
- return -1;
- }
-
+ return INLINE_SYSCALL_ERROR_RETURN_VALUE (ENOMEM);
return 0;
}
weak_alias (__brk, brk)