Fix printing of integer Kelvins broken in rev. 1.71, which is
fatal on sizeof(int) != sizeof(long) systems (such as amd64). MFC after: 1 day
This commit is contained in:
parent
adfa0adec0
commit
e556ec911a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=161313
@ -584,11 +584,11 @@ show_var(int *oid, int nlen)
|
|||||||
printf(hflag ? "%'#010x" : "%#010x",
|
printf(hflag ? "%'#010x" : "%#010x",
|
||||||
*(unsigned int *)p);
|
*(unsigned int *)p);
|
||||||
else if (*fmt == 'K') {
|
else if (*fmt == 'K') {
|
||||||
if (*(long *)p < 0)
|
if (*(int *)p < 0)
|
||||||
printf("%ld", *(long *)p);
|
printf("%d", *(int *)p);
|
||||||
else
|
else
|
||||||
printf("%.1fC",
|
printf("%.1fC",
|
||||||
(*(long *)p - 2732.0) / 10);
|
(*(int *)p - 2732.0) / 10);
|
||||||
} else
|
} else
|
||||||
printf(hflag ? "%'d" : "%d", *(int *)p);
|
printf(hflag ? "%'d" : "%d", *(int *)p);
|
||||||
val = " ";
|
val = " ";
|
||||||
|
Loading…
Reference in New Issue
Block a user