summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/x86_64
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/x86_64')
-rw-r--r--libc/sysdeps/linux/x86_64/brk.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/libc/sysdeps/linux/x86_64/brk.c b/libc/sysdeps/linux/x86_64/brk.c
index fc906abc1..b1ee640af 100644
--- a/libc/sysdeps/linux/x86_64/brk.c
+++ b/libc/sysdeps/linux/x86_64/brk.c
@@ -25,19 +25,20 @@
void *__curbrk attribute_hidden = 0;
/* libc_hidden_proto(brk) */
-int brk (void *addr)
+int brk(void *addr)
{
- void *__unbounded newbrk;
+ void *newbrk;
__asm__ ("syscall\n"
- : "=a" (newbrk)
- : "0" (__NR_brk), "D" (__ptrvalue (addr))
- : "r11","rcx","memory");
+ : "=a" (newbrk)
+ : "0" (__NR_brk), "D" (addr)
+ : "r11", "rcx"
+ );
__curbrk = newbrk;
if (newbrk < addr) {
- __set_errno (ENOMEM);
+ __set_errno(ENOMEM);
return -1;
}