From: Baptiste Daroussin Date: Wed, 1 Feb 2017 19:28:01 +0000 (+0100) Subject: Fix the deciKelvin to Celsius conversion on FreeBSD (#195) X-Git-Tag: 2.12~28 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=93576bccc3acff95206933cc1486e0d01c15316e;p=i3%2Fi3status Fix the deciKelvin to Celsius conversion on FreeBSD (#195) Change from ceiled value to floored value to be consistent with the FreeBSD kernel https://svnweb.freebsd.org/base?view=revision&revision=300421 --- diff --git a/src/print_cpu_temperature.c b/src/print_cpu_temperature.c index 57cb114..56ab62a 100644 --- a/src/print_cpu_temperature.c +++ b/src/print_cpu_temperature.c @@ -13,7 +13,7 @@ #include #include #include -#define TZ_ZEROC 2732 +#define TZ_ZEROC 2731 #define TZ_KELVTOC(x) (((x)-TZ_ZEROC) / 10), abs(((x)-TZ_ZEROC) % 10) #define TZ_AVG(x) ((x)-TZ_ZEROC) / 10 #endif