Xinqi Bao's Git
projects
/
slstatus.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
| inline |
side by side
Fix temperature reporting on OpenBSD
[slstatus.git]
/
components
/
temperature.c
diff --git
a/components/temperature.c
b/components/temperature.c
index
8462d0f
..
8e1f222
100644
(file)
--- a/
components/temperature.c
+++ b/
components/temperature.c
@@
-45,7
+45,7
@@
}
/* kelvin to celsius */
- return bprintf("%d", (
temp.value - 273150000) / 1E6
);
+ return bprintf("%d", (
int)((float)(temp.value-273150000) / 1E6)
);
}
#elif defined(__FreeBSD__)
#include <stdio.h>