2
0
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:
Jean Delvare
2007-08-13 20:16:03 +00:00
parent 69757bcc20
commit 3bab00fff9
9 changed files with 95 additions and 91 deletions

View File

@@ -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));