Fix warnings when uintptr_t is larger than int.

* sysdeps/unix/sysv/linux/shmat.c (shmat): Use -1l to avoid
	warnings.
This commit is contained in:
David S. Miller 2012-03-16 21:02:54 -07:00
parent 7e7fa5f871
commit 77e927affd
2 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,8 @@
2012-03-16 David S. Miller <davem@davemloft.net>
* sysdeps/unix/sysv/linux/shmat.c (shmat): Use -1l to avoid
warnings.
[BZ #6471]
* sysdeps/unix/sysv/linux/shmat.c (shmat): Test for syscall errors
properly.

View File

@ -55,7 +55,7 @@ shmat (shmid, shmaddr, shmflg)
if (INTERNAL_SYSCALL_ERROR_P (resultvar, err))
{
__set_errno (INTERNAL_SYSCALL_ERRNO (resultvar, err));
return (void *) -1;
return (void *) -1l;
}
return BOUNDED_N (raddr, length);