summaryrefslogtreecommitdiffstats
path: root/sbin/sysctl
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/sysctl')
-rw-r--r--sbin/sysctl/sysctl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/sysctl/sysctl.c b/sbin/sysctl/sysctl.c
index d171ec9..1c5fc9d 100644
--- a/sbin/sysctl/sysctl.c
+++ b/sbin/sysctl/sysctl.c
@@ -584,11 +584,11 @@ show_var(int *oid, int nlen)
printf(hflag ? "%'#010x" : "%#010x",
*(unsigned int *)p);
else if (*fmt == 'K') {
- if (*(long *)p < 0)
- printf("%ld", *(long *)p);
+ if (*(int *)p < 0)
+ printf("%d", *(int *)p);
else
printf("%.1fC",
- (*(long *)p - 2732.0) / 10);
+ (*(int *)p - 2732.0) / 10);
} else
printf(hflag ? "%'d" : "%d", *(int *)p);
val = " ";
OpenPOWER on IntegriCloud