Skip to content

Commit

Permalink
Fix warnings when uintptr_t is larger than int.
Browse files Browse the repository at this point in the history
	* sysdeps/unix/sysv/linux/shmat.c (shmat): Use -1l to avoid
	warnings.
  • Loading branch information
David S. Miller committed Mar 17, 2012
1 parent 7e7fa5f commit 77e927a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion sysdeps/unix/sysv/linux/shmat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 77e927a

Please sign in to comment.