tAdd comment for magic number in conversion - spoon - dwm status utility (2f30 fork)
(HTM) git clone git://src.adamsgaard.dk/spoon
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) LICENSE
---
(DIR) commit 311f1ed9305fbaadc78ecd85c50e3b2df87e5567
(DIR) parent 5334192a401aaa7ff17d0f12f46d02764ac4d11c
(HTM) Author: sin <sin@2f30.org>
Date: Wed, 2 Nov 2016 14:15:40 +0000
Add comment for magic number in conversion
Diffstat:
M temp.c | 1 +
1 file changed, 1 insertion(+), 0 deletions(-)
---
(DIR) diff --git a/temp.c b/temp.c
t@@ -21,6 +21,7 @@ tempread(void *arg, char *buf, size_t len)
sz = sizeof(temp);
if (sysctl(mib, 5, &temp, &sz, NULL, 0) == -1)
return -1;
+ /* temp.value is in kelvin so convert to celsius for display */
snprintf(buf, len, "%ddegC", (temp.value - 273150000) / 1000000);
return 0;
}