mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-10-31 13:10:30 +00:00
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:
1 parent
64ebcefe4b
commit
04e0399c6f
1 file changed
+2
-2
+2
-2
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user