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:
Frodo Looijaard committed 1998-12-20 21:57:39 +00:00
1 parent 750e0d00aa
commit 1779b684c1
8 files changed
+161 -9

No files matched your search

+4 -2
View File
@@ -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;
}