Skip to content

Commit

Permalink
Properly cast 64-bit dofhp_dof to pointer.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
gonzoua committed Mar 26, 2012
1 parent d106d7d commit 39968e8
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions sys/cddl/dev/dtrace/dtrace_ioctl.c
Expand Up @@ -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);
Expand Down

0 comments on commit 39968e8

Please sign in to comment.