sysctl: cast pointers to kernel_ureg_t instead of size_t

* sysctl.c (SYS_FUNC(sysctl)): Cast __sysctl_args.oldval and
__sysctl_args.newval pointers to kernel_ureg_t instead of size_t.
This commit is contained in:
Дмитрий Левин 2016-12-23 23:49:55 +00:00
parent a8631ca4bc
commit 17ec19d2a9

View File

@ -173,7 +173,7 @@ SYS_FUNC(sysctl)
&& (name[1] == KERN_OSRELEASE
|| name[1] == KERN_OSTYPE
)))) {
printpath(tcp, (size_t)info.oldval);
printpath(tcp, (kernel_ureg_t) info.oldval);
} else {
tprintf("%p", info.oldval);
}
@ -183,7 +183,7 @@ SYS_FUNC(sysctl)
else if (syserror(tcp))
tprintf("%p", info.newval);
else
printpath(tcp, (size_t)info.newval);
printpath(tcp, (kernel_ureg_t) info.newval);
tprintf(", %lu", (unsigned long)info.newlen);
}