aboutsummaryrefslogtreecommitdiff
path: root/sbin/sysctl
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2006-12-10 06:36:41 +0000
committerWarner Losh <imp@FreeBSD.org>2006-12-10 06:36:41 +0000
commitf195a1221fb14443b3a83f46eeb748e17a7f5cb6 (patch)
treefc43d9a38425b1ca99d04f67bae1ca1841042012 /sbin/sysctl
parente150f641d099ea1fdfcf7c8b7ce27949d45ce0e5 (diff)
Notes
Diffstat (limited to 'sbin/sysctl')
-rw-r--r--sbin/sysctl/sysctl.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sbin/sysctl/sysctl.c b/sbin/sysctl/sysctl.c
index 3ee565886419..d0fbc10808f4 100644
--- a/sbin/sysctl/sysctl.c
+++ b/sbin/sysctl/sysctl.c
@@ -618,8 +618,7 @@ show_var(int *oid, int nlen)
while (len >= sizeof(int)) {
fputs(val, stdout);
if (*fmt == 'U')
- printf(hflag ? "%'u" : "%u",
- *(unsigned int *)p);
+ printf(hflag ? "%'u" : "%u", *(u_int *)p);
else if (*fmt == 'X')
printf(hflag ? "%'#010x" : "%#010x",
*(unsigned int *)p);
@@ -646,11 +645,10 @@ show_var(int *oid, int nlen)
while (len >= sizeof(long)) {
fputs(val, stdout);
if (*fmt == 'U')
- printf(hflag ? "%'lu" : "%lu",
- *(unsigned long *)p);
+ printf(hflag ? "%'lu" : "%lu", *(u_long *)p);
else if (*fmt == 'X')
printf(hflag ? "%'#018lx" : "%#018lx",
- *(unsigned long *)p);
+ *(u_long *)p);
else if (*fmt == 'K') {
if (*(long *)p < 0)
printf("%ld", *(long *)p);