X-Git-Url: https://git.xinqibao.xyz/slstatus.git/blobdiff_plain/ec5c35ec9f23254f09e734d0c1880559774dfa52..fa7c266e2b7adbc2a87bd44057b9e561d9ed61e3:/components/temperature.c diff --git a/components/temperature.c b/components/temperature.c index 4e27a9d..fe2e0c9 100644 --- a/components/temperature.c +++ b/components/temperature.c @@ -16,9 +16,7 @@ return bprintf("%d", temp / 1000); } #elif defined(__OpenBSD__) - #include #include - #include #include /* before for struct timeval */ #include #include @@ -44,6 +42,6 @@ } /* kelvin to celsius */ - return bprintf("%d", (temp.value - 273150000) / 1000000); + return bprintf("%d", (temp.value - 273150000) / 1E6); } #endif