Negative magnitude bugfix

git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1597 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare committed 2002-11-10 23:13:38 +00:00
1 parent 64ebcefe4b
commit 04e0399c6f
1 file changed
+2 -2
+2 -2
View File
@@ -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);