summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2020-01-11 18:51:55 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2020-01-11 18:51:55 +0000
commit6e81a27a108f4e004d45120a8c742a639be3eece (patch)
tree069fe2994a2cd75ce08b23b0c48bece3d13e4aee /sys
parentc8f147f58738bb120f4ad273d9b48f71d76f8065 (diff)
Make sure we use signed types in the sensor value calculation; 'char' is
unsigned on some of our hardware platforms! ok deraadt@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ipmi.c6
1 files changed, 3 insertions, 3 deletions
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 */