Properly cast 64-bit dofhp_dof to pointer.

For i386 this change is no-op. For AMD64 it was tested with DTrace test
suite: results are the same from the test run before the change and after
This commit is contained in:
Oleksandr Tymoshenko 2012-03-26 21:22:51 +00:00
parent bea977e7f6
commit 933fab9d73

View file

@ -39,11 +39,7 @@ dtrace_ioctl_helper(struct cdev *dev, u_long cmd, caddr_t addr, int flags,
case DTRACEHIOC_ADDDOF:
dhp = (dof_helper_t *)addr;
/* XXX all because dofhp_dof is 64 bit */
#ifdef __i386
addr = (caddr_t)(uint32_t)dhp->dofhp_dof;
#else
addr = (caddr_t)dhp->dofhp_dof;
#endif
addr = (caddr_t)(vm_offset_t)dhp->dofhp_dof;
/* FALLTHROUGH */
case DTRACEHIOC_ADD:
dof = dtrace_dof_copyin((intptr_t)addr, &rval);