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