return size;
}
-int psensor_list_contains_type(struct psensor **sensors, unsigned int type)
+bool psensor_list_contains_type(struct psensor **sensors, unsigned int type)
{
- struct psensor **s;
-
if (!sensors)
- return 0;
+ return false;
- s = sensors;
- while (*s) {
- if ((*s)->type & type)
- return 1;
- s++;
+ while (*sensors) {
+ if (((*sensors)->type & type) == type)
+ return true;
+ sensors++;
}
- return 0;
+ return false;
}
struct psensor **psensor_list_add(struct psensor **sensors,
}
}
-void psensor_init()
-{
-}
-
-void psensor_cleanup()
-{
-}
-
struct psensor **psensor_list_copy(struct psensor **sensors)
{
struct psensor **result;