From 04e0399c6ffad18d8abfff5e43b0cd8992ce8664 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Sun, 10 Nov 2002 23:13:38 +0000 Subject: [PATCH] Negative magnitude bugfix git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1597 7894878c-1315-0410-8ee3-d5d059ff63e0 --- lib/proc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/proc.c b/lib/proc.c index a9aeaca3..cbc36e31 100644 --- a/lib/proc.c +++ b/lib/proc.c @@ -165,7 +165,7 @@ int sensors_read_proc(sensors_chip_name name, int feature, double *value) *value = *((long *) (buf + the_feature->offset)); for (mag = the_feature->scaling; mag > 0; mag --) *value /= 10.0; - for (; mag < 0; mag --) + for (; mag < 0; mag ++) *value *= 10.0; return 0; } @@ -186,7 +186,7 @@ int sensors_write_proc(sensors_chip_name name, int feature, double value) return -SENSORS_ERR_PROC; for (mag = the_feature->scaling; mag > 0; mag --) value *= 10.0; - for (; mag < 0; mag --) + for (; mag < 0; mag ++) value /= 10.0; * ((long *) (buf + the_feature->offset)) = (long) value; buflen = the_feature->offset + sizeof(long);