diff options
author | cui fliter <imcusg@gmail.com> | 2023-05-09 18:03:08 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-09 12:03:08 +0200 |
commit | 49aba759744c06fb3a6fa998155428520f161734 (patch) | |
tree | 5cad6acc4ff6adac01ec756a4c9baa89d45f5c0f /psutil/arch | |
parent | 5c52826e7eac9648006392f5d491f6fdf6ff50a8 (diff) | |
download | psutil-49aba759744c06fb3a6fa998155428520f161734.tar.gz |
Signed-off-by: cui fliter <imcusg@gmail.com>
Diffstat (limited to 'psutil/arch')
-rw-r--r-- | psutil/arch/freebsd/sensors.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/psutil/arch/freebsd/sensors.c b/psutil/arch/freebsd/sensors.c index 0042adbe..08a882dd 100644 --- a/psutil/arch/freebsd/sensors.c +++ b/psutil/arch/freebsd/sensors.c @@ -20,7 +20,7 @@ For reference, here's the git history with original(ish) implementations: #include "../../_psutil_posix.h" -#define DECIKELVIN_2_CELCIUS(t) (t - 2731) / 10 +#define DECIKELVIN_2_CELSIUS(t) (t - 2731) / 10 PyObject * @@ -62,13 +62,13 @@ psutil_sensors_cpu_temperature(PyObject *self, PyObject *args) { sprintf(sensor, "dev.cpu.%d.temperature", core); if (sysctlbyname(sensor, ¤t, &size, NULL, 0)) goto error; - current = DECIKELVIN_2_CELCIUS(current); + current = DECIKELVIN_2_CELSIUS(current); // Return -273 in case of failure. sprintf(sensor, "dev.cpu.%d.coretemp.tjmax", core); if (sysctlbyname(sensor, &tjmax, &size, NULL, 0)) tjmax = 0; - tjmax = DECIKELVIN_2_CELCIUS(tjmax); + tjmax = DECIKELVIN_2_CELSIUS(tjmax); return Py_BuildValue("ii", current, tjmax); |