mirror of
https://github.com/lm-sensors/lm-sensors
synced 2025-08-30 22:05:11 +00:00
Change the libsensors API so that all structures are passed by
reference. This is more efficient that way. git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4666 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
@@ -259,7 +259,7 @@ int do_the_real_work(int *error)
|
||||
*error = 0;
|
||||
for (chip_nr = 0; (chip = sensors_get_detected_chips(&chip_nr));)
|
||||
for(i = 0; i < chips_count; i++)
|
||||
if (sensors_match_chip(*chip,chips[i])) {
|
||||
if (sensors_match_chip(chip, &chips[i])) {
|
||||
if(do_sets) {
|
||||
if (do_a_set(*chip))
|
||||
*error = 1;
|
||||
@@ -276,7 +276,7 @@ int do_a_set(sensors_chip_name name)
|
||||
{
|
||||
int res;
|
||||
|
||||
if ((res = sensors_do_chip_sets(name))) {
|
||||
if ((res = sensors_do_chip_sets(&name))) {
|
||||
if (res == -SENSORS_ERR_PROC) {
|
||||
fprintf(stderr,"%s: %s for writing;\n",sprintf_chip_name(name),
|
||||
sensors_strerror(res));
|
||||
|
Reference in New Issue
Block a user