mirror of
https://github.com/fluencelabs/musl
synced 2025-06-30 07:02:41 +00:00
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.
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user