Browse Source

sensing: Fix static assert in get_sensor_by_dev()

With assert condition set to true, assertion never happens.
Change __ASSERT(true) to __ASSERT(false).

Signed-off-by: Dmitry Lukyantsev <dmitrylu@meta.com>
pull/84184/head
Dmitry Lukyantsev 6 months ago committed by Benjamin Cabé
parent
commit
d46546e2d8
  1. 2
      subsys/sensing/sensor_mgmt.h

2
subsys/sensing/sensor_mgmt.h

@ -66,7 +66,7 @@ static inline struct sensing_sensor *get_sensor_by_dev(const struct device *dev) @@ -66,7 +66,7 @@ static inline struct sensing_sensor *get_sensor_by_dev(const struct device *dev)
}
}
__ASSERT(true, "device %s is not a sensing sensor", dev->name);
__ASSERT(false, "device %s is not a sensing sensor", dev->name);
return NULL;
}

Loading…
Cancel
Save