From 59bb84753cfb23b0718cfaf3abedc1eaf671c885 Mon Sep 17 00:00:00 2001 From: Justin Hibbits Date: Sun, 18 Jan 2015 07:08:06 +0000 Subject: [PATCH] Use proper signed types. The ADT746x uses signed 8-bit numbers for the temperature. MFC after: 2 weeks --- sys/dev/iicbus/adt746x.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/dev/iicbus/adt746x.c b/sys/dev/iicbus/adt746x.c index 42974e79028f..35cbc3eb47c5 100644 --- a/sys/dev/iicbus/adt746x.c +++ b/sys/dev/iicbus/adt746x.c @@ -539,9 +539,10 @@ static int adt746x_sensor_read(struct adt746x_sensor *sens) { struct adt746x_softc *sc; - uint16_t tmp = 0; + int tmp = 0; uint16_t val; - uint8_t temp, data[1], data1[1]; + uint8_t data[1], data1[1]; + int8_t temp; sc = device_get_softc(sens->dev); if (sens->type != ADT746X_SENSOR_SPEED) {