Skip to content
Snippets Groups Projects

fix(bhi, leds): fixed faulty error handling due to always-false unsigned comparisons

Merged fuchsi* requested to merge fuchsi/firmware:faulty_unsigned_comparisons into master
3 files
+ 5
5
Compare changes
  • Side-by-side
  • Inline
Files
3
+ 2
2
@@ -131,7 +131,7 @@ int epic_bhi160_enable_sensor(
int result = 0;
bhy_virtual_sensor_t vs_id = bhi160_lookup_vs_id(sensor_type);
if (vs_id < 0) {
if (vs_id == (bhy_virtual_sensor_t)-1) {
return -ENODEV;
}
@@ -188,7 +188,7 @@ int epic_bhi160_disable_sensor(enum bhi160_sensor_type sensor_type)
int result = 0;
bhy_virtual_sensor_t vs_id = bhi160_lookup_vs_id(sensor_type);
if (vs_id < 0) {
if (vs_id == (bhy_virtual_sensor_t)-1) {
return -ENODEV;
}
Loading