From fd142e5ec44aaafffbb8bb4ea41c4288d3fa937a Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Mon, 26 Sep 2011 00:59:28 -0400 Subject: cleanup various minor issues reported by nsz the changes to syscall_ret are mostly no-ops in the generated code, just cleanup of type issues and removal of some implementation-defined behavior. the one exception is the change in the comparison value, which is fixed so that 0xf...f000 (which in principle could be a valid return value for mmap, although probably never in reality) is not treated as an error return. --- src/internal/syscall_ret.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/internal/syscall_ret.c') 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; } -- cgit v1.2.1