From 6e81a27a108f4e004d45120a8c742a639be3eece Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Sat, 11 Jan 2020 18:51:55 +0000 Subject: Make sure we use signed types in the sensor value calculation; 'char' is unsigned on some of our hardware platforms! ok deraadt@ --- sys/dev/ipmi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys') diff --git a/sys/dev/ipmi.c b/sys/dev/ipmi.c index 3af03a8c2f2..594602bfcd1 100644 --- a/sys/dev/ipmi.c +++ b/sys/dev/ipmi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ipmi.c,v 1.107 2019/12/31 10:05:32 mpi Exp $ */ +/* $OpenBSD: ipmi.c,v 1.108 2020/01/11 18:51:54 kettenis Exp $ */ /* * Copyright (c) 2015 Masao Uebayashi @@ -1171,8 +1171,8 @@ signextend(unsigned long val, int bits) long ipmi_convert(u_int8_t v, struct sdrtype1 *s1, long adj) { - short M, B; - char K1, K2; + int16_t M, B; + int8_t K1, K2; long val; /* Calculate linear reading variables */ -- cgit v1.2.3