mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-25 20:28:21 +00:00
More library stuff
Nice init and cleanup functions. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@97 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
750e0d00aa
commit
1779b684c1
8 files changed
+161
-9
No files matched your search
+4
-2
@@ -141,10 +141,12 @@ int sensors_get_label(sensors_chip_name name, int feature, char **result)
|
||||
for (chip = NULL; (chip = sensors_for_all_config_chips(name,chip));)
|
||||
for (i = 0; i < chip->labels_count; i++)
|
||||
if (!strcmp(featureptr->name, chip->labels[i].name)) {
|
||||
*result = strdup(chip->labels[i].name);
|
||||
if (! (*result = strdup(chip->labels[i].name)))
|
||||
sensors_fatal_error("sensors_get_label","Allocating label text");
|
||||
return 0;
|
||||
}
|
||||
*result = strdup(featureptr->name);
|
||||
if (! (*result = strdup(featureptr->name)))
|
||||
sensors_fatal_error("sensors_get_label","Allocating label text");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user