summaryrefslogtreecommitdiff
path: root/src/internal/syscall_ret.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/internal/syscall_ret.c')
-rw-r--r--src/internal/syscall_ret.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/internal/syscall_ret.c b/src/internal/syscall_ret.c
index 4f159e0b..e4a1bdbe 100644
--- a/src/internal/syscall_ret.c
+++ b/src/internal/syscall_ret.c
@@ -3,9 +3,9 @@
long __syscall_ret(unsigned long r)
{
- if (r >= (unsigned long)-1 - 4096) {
- errno = -(long)r;
+ if (r > -4096UL) {
+ errno = -r;
return -1;
}
- return (long)r;
+ return r;
}