Fix a warning. useracc() should take a const pointer argument.

This commit is contained in:
Peter Wemm 2002-02-26 01:00:39 +00:00
parent bd47bef5aa
commit a1f7f9fec8
2 changed files with 4 additions and 4 deletions

View File

@ -712,11 +712,11 @@ sigreturn(td, uap)
{
struct proc *p = td->td_proc;
struct trapframe *regs;
ucontext_t *ucp;
const ucontext_t *ucp;
int cs, eflags;
ucp = uap->sigcntxp;
if (!useracc((caddr_t)ucp, sizeof(*ucp), VM_PROT_READ))
if (!useracc((caddr_t)(uintptr_t)ucp, sizeof(*ucp), VM_PROT_READ))
return (EFAULT);
regs = td->td_frame;
eflags = ucp->uc_mcontext.mc_eflags;

View File

@ -712,11 +712,11 @@ sigreturn(td, uap)
{
struct proc *p = td->td_proc;
struct trapframe *regs;
ucontext_t *ucp;
const ucontext_t *ucp;
int cs, eflags;
ucp = uap->sigcntxp;
if (!useracc((caddr_t)ucp, sizeof(*ucp), VM_PROT_READ))
if (!useracc((caddr_t)(uintptr_t)ucp, sizeof(*ucp), VM_PROT_READ))
return (EFAULT);
regs = td->td_frame;
eflags = ucp->uc_mcontext.mc_eflags;