From b9705c8727ed2017b7fa1816d7e1bc63761fbf11 Mon Sep 17 00:00:00 2001 From: malo Date: Sat, 9 Apr 2016 22:12:44 +0200 Subject: [PATCH] drivers: si70xx: fixed si70xx_measure return value calculation on 16bit platforms Signed-off-by: malo --- drivers/si70xx/si70xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/si70xx/si70xx.c b/drivers/si70xx/si70xx.c index 10431264f7..807f9b234c 100644 --- a/drivers/si70xx/si70xx.c +++ b/drivers/si70xx/si70xx.c @@ -36,7 +36,7 @@ static uint32_t si70xx_measure(si70xx_t *dev, uint8_t command) i2c_release(dev->i2c_dev); /* reconstruct raw result */ - return (result[0] << 8) + (result[1] & 0xfc); + return ((uint32_t)result[0] << 8) + (result[1] & 0xfc); } int si70xx_test(si70xx_t *dev)