about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/shmat.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/shmat.c')
-rw-r--r--sysdeps/unix/sysv/linux/shmat.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sysdeps/unix/sysv/linux/shmat.c b/sysdeps/unix/sysv/linux/shmat.c
index 94d18d3f66..69bcf77793 100644
--- a/sysdeps/unix/sysv/linux/shmat.c
+++ b/sysdeps/unix/sysv/linux/shmat.c
@@ -43,10 +43,8 @@ shmat (shmid, shmaddr, shmflg)
 				(long int) &raddr,
 				(void *) shmaddr);
   if (INTERNAL_SYSCALL_ERROR_P (resultvar, err))
-    {
-      __set_errno (INTERNAL_SYSCALL_ERRNO (resultvar, err));
-      return (void *) -1l;
-    }
+    return (void *) INLINE_SYSCALL_ERROR_RETURN_VALUE (INTERNAL_SYSCALL_ERRNO (resultvar,
+									       err));
 
   return raddr;
 }