static int sensors_feature_name_to_type (const char *name)
{
- int i;
-
/* Yes, this is slow, but it's only ever done during initialization, so
* it's a one time cost.. */
- for (i = 0; i < known_features_num; i++)
+ for (int i = 0; i < known_features_num; i++)
if (strcasecmp (known_features[i].label, name) == 0)
return (known_features[i].type);
static void sensors_free_features (void)
{
- featurelist_t *thisft;
featurelist_t *nextft;
if (first_feature == NULL)
sensors_cleanup ();
- for (thisft = first_feature; thisft != NULL; thisft = nextft)
+ for (featurelist_t *thisft = first_feature; thisft != NULL; thisft = nextft)
{
nextft = thisft->next;
sfree (thisft);
static int sensors_read (void)
{
- featurelist_t *fl;
-
if (sensors_load_conf () != 0)
return (-1);
#if SENSORS_API_VERSION < 0x400
- for (fl = first_feature; fl != NULL; fl = fl->next)
+ for (featurelist_t *fl = first_feature; fl != NULL; fl = fl->next)
{
double value;
int status;
/* #endif SENSORS_API_VERSION < 0x400 */
#elif (SENSORS_API_VERSION >= 0x400) && (SENSORS_API_VERSION < 0x500)
- for (fl = first_feature; fl != NULL; fl = fl->next)
+ for (featurelist_t *fl = first_feature; fl != NULL; fl = fl->next)
{
double value;
int status;