From 17ec19d2a99686ce2cb71d7f9531e127b18c8963 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Fri, 23 Dec 2016 23:49:55 +0000 Subject: [PATCH] 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. --- sysctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysctl.c b/sysctl.c index 12763ac4..94779572 100644 --- a/sysctl.c +++ b/sysctl.c @@ -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); } -- 2.40.0