summaryrefslogtreecommitdiff
path: root/sbin/sysctl
diff options
context:
space:
mode:
authorNate Lawson <njl@FreeBSD.org>2006-07-25 02:28:43 +0000
committerNate Lawson <njl@FreeBSD.org>2006-07-25 02:28:43 +0000
commite05cdb74904d65c50db65c46a598391f68921866 (patch)
tree1d3872b2bd925248324c9d565ccfe20765aef05a /sbin/sysctl
parentcf90f178b94b82d20291acbba4c6eb1f5ef83299 (diff)
Notes
Diffstat (limited to 'sbin/sysctl')
-rw-r--r--sbin/sysctl/sysctl.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sbin/sysctl/sysctl.c b/sbin/sysctl/sysctl.c
index aaffc19a839b..a1ef11ccd1d0 100644
--- a/sbin/sysctl/sysctl.c
+++ b/sbin/sysctl/sysctl.c
@@ -583,7 +583,9 @@ show_var(int *oid, int nlen)
if (*(int *)p < 0)
printf("%d", *(int *)p);
else
- printf("%d.%dC", (*(int *)p - 2732) / 10, (*(int *)p - 2732) % 10);
+ printf("%d.%dC",
+ (*(int *)p - 2732) / 10,
+ abs((*(int *)p - 2732) % 10));
} else
printf(hflag ? "%'d" : "%d", *(int *)p);
val = " ";
@@ -605,7 +607,9 @@ show_var(int *oid, int nlen)
if (*(long *)p < 0)
printf("%ld", *(long *)p);
else
- printf("%ld.%ldC", (*(long *)p - 2732) / 10, (*(long *)p - 2732) % 10);
+ printf("%ld.%ldC",
+ (*(long *)p - 2732) / 10,
+ abs((*(long *)p - 2732) % 10));
} else
printf(hflag ? "%'ld" : "%ld", *(long *)p);
val = " ";