This is an automated email from the ASF dual-hosted git repository. janc pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
commit 719760c745e2dc1edaba8bd8f448a4903d5fadb9 Author: Magdalena Kasenberg <magdalena.kasenb...@codecoup.pl> AuthorDate: Fri Feb 26 12:03:43 2021 +0100 sensors/lis2dh12: Fix constant expression result Fix wrong operand. Coverity issues 204229. --- hw/drivers/sensors/lis2dh12/src/lis2dh12.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/drivers/sensors/lis2dh12/src/lis2dh12.c b/hw/drivers/sensors/lis2dh12/src/lis2dh12.c index 80cc939..2ba3b80 100644 --- a/hw/drivers/sensors/lis2dh12/src/lis2dh12.c +++ b/hw/drivers/sensors/lis2dh12/src/lis2dh12.c @@ -815,7 +815,7 @@ lis2dh12_set_rate(struct sensor_itf *itf, uint8_t rate) * for a reset of the filter block before switching to * normal/high-performance mode from power down mode */ - if (rate != LIS2DH12_DATA_RATE_0HZ || rate != LIS2DH12_DATA_RATE_L_1620HZ) { + if (rate != LIS2DH12_DATA_RATE_0HZ && rate != LIS2DH12_DATA_RATE_L_1620HZ) { rc = lis2dh12_readlen(itf, LIS2DH12_REG_REFERENCE, ®, 1); if (rc) {