sysctl: cast pointers to kernel_ureg_t instead of long

* sysctl.c (SYS_FUNC(sysctl)): Cast __sysctl_args.oldlenp pointer
to kernel_ureg_t instead of long.
This commit is contained in:
Дмитрий Левин 2016-12-23 23:43:53 +00:00
parent 4d5523527b
commit a8631ca4bc

View File

@ -167,7 +167,7 @@ SYS_FUNC(sysctl)
size_t oldlen = 0;
if (info.oldval == NULL) {
tprints("NULL");
} else if (umove(tcp, (long)info.oldlenp, &oldlen) >= 0
} else if (umove(tcp, (kernel_ureg_t) info.oldlenp, &oldlen) >= 0
&& info.nlen >= 2
&& ((name[0] == CTL_KERN
&& (name[1] == KERN_OSRELEASE