bugfix: unify temp module temperature_get_bus_files() functions

CID 1039874
This commit is contained in:
Mike Blumenkrantz 2014-04-04 14:51:21 -04:00
parent ed50455cde
commit ee3370d226
1 changed files with 30 additions and 34 deletions

View File

@ -363,21 +363,19 @@ temperature_face_update_config(Config_Face *inst)
}
Eina_List *
temperature_get_bus_files(const char* bus)
temperature_get_bus_files(const char *bus)
{
Eina_List *result, *therms;
Eina_List *result;
Eina_List *therms;
char path[PATH_MAX];
char busdir[PATH_MAX];
char *name;
result = NULL;
if (result)
{
snprintf(busdir, sizeof(busdir), "/sys/bus/%s/devices", bus);
/* Look through all the devices for the given bus. */
therms = ecore_file_ls(busdir);
if (therms)
{
char *name;
EINA_LIST_FREE(therms, name)
{
@ -404,8 +402,6 @@ temperature_get_bus_files(const char* bus)
}
free(name);
}
}
}
return result;
}