Fix a warning. useracc() should take a const pointer argument.
This commit is contained in:
parent
bd47bef5aa
commit
a1f7f9fec8
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user