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:
Rich Felker 2011-09-26 00:59:28 -04:00
commit fd142e5ec4
6 changed files with 9 additions and 9 deletions

View file

@ -1,7 +1,7 @@
#include <stddef.h>
#include <stdint.h>
#include "syscall.h"
void *sbrk(ptrdiff_t inc)
void *sbrk(intptr_t inc)
{
unsigned long cur = syscall(SYS_brk, 0);
if (inc && syscall(SYS_brk, cur+inc) != cur+inc) return (void *)-1;