aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleksandr Tymoshenko <gonzo@FreeBSD.org>2012-03-26 21:22:51 +0000
committerOleksandr Tymoshenko <gonzo@FreeBSD.org>2012-03-26 21:22:51 +0000
commit933fab9d731ce1e7d9bccbb5fae7eb60055583bf (patch)
treee99407f354f627631e1586e8614ed7c500183557
parentbea977e7f6d2cf499ff32300c220163fa631648f (diff)
downloadsrc-933fab9d731ce1e7d9bccbb5fae7eb60055583bf.tar.gz
src-933fab9d731ce1e7d9bccbb5fae7eb60055583bf.zip
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
Notes
Notes: svn path=/head/; revision=233521
-rw-r--r--sys/cddl/dev/dtrace/dtrace_ioctl.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/sys/cddl/dev/dtrace/dtrace_ioctl.c b/sys/cddl/dev/dtrace/dtrace_ioctl.c
index 79fea7bb79da..fbc891d444f6 100644
--- a/sys/cddl/dev/dtrace/dtrace_ioctl.c
+++ b/sys/cddl/dev/dtrace/dtrace_ioctl.c
@@ -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);