Skip to content

Commit

Permalink
sensing: Fix static assert in get_sensor_by_dev()
Browse files Browse the repository at this point in the history
With assert condition set to true, assertion never happens.
Change __ASSERT(true) to __ASSERT(false).

Signed-off-by: Dmitry Lukyantsev <[email protected]>
  • Loading branch information
dluke62 committed Jan 6, 2025
1 parent 88b9cb6 commit 551a697
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion subsys/sensing/sensor_mgmt.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 551a697

Please sign in to comment.