summaryrefslogtreecommitdiffstats
path: root/sys/dev/k8temp
diff options
context:
space:
mode:
authorrpaulo <rpaulo@FreeBSD.org>2008-05-14 09:57:21 +0000
committerrpaulo <rpaulo@FreeBSD.org>2008-05-14 09:57:21 +0000
commit736627982966b02cb1018a9d490a4a23cf0ba74d (patch)
tree41feb1161324c789fbe8209bd0e6dcfe2cd31f53 /sys/dev/k8temp
parent6b54f6342e0134ee6b79b96bc46133ead7c54936 (diff)
downloadFreeBSD-src-736627982966b02cb1018a9d490a4a23cf0ba74d.zip
FreeBSD-src-736627982966b02cb1018a9d490a4a23cf0ba74d.tar.gz
Actually, don't rely on the unsafe MAX() macro. Use imax() as provided
in the PR patch. Pointed out by: bde PR: 123542
Diffstat (limited to 'sys/dev/k8temp')
-rw-r--r--sys/dev/k8temp/k8temp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/k8temp/k8temp.c b/sys/dev/k8temp/k8temp.c
index 4038ed2..c8e5c1f 100644
--- a/sys/dev/k8temp/k8temp.c
+++ b/sys/dev/k8temp/k8temp.c
@@ -265,12 +265,12 @@ k8temp_sysctl(SYSCTL_HANDLER_ARGS)
case CORE0:
auxtemp[0] = k8temp_gettemp(dev, SENSOR0_CORE0);
auxtemp[1] = k8temp_gettemp(dev, SENSOR1_CORE0);
- temp = MAX(auxtemp[0], auxtemp[1]);
+ temp = imax(auxtemp[0], auxtemp[1]);
break;
case CORE1:
auxtemp[0] = k8temp_gettemp(dev, SENSOR0_CORE1);
auxtemp[1] = k8temp_gettemp(dev, SENSOR1_CORE1);
- temp = MAX(auxtemp[0], auxtemp[1]);
+ temp = imax(auxtemp[0], auxtemp[1]);
break;
default:
temp = k8temp_gettemp(dev, arg2);
OpenPOWER on IntegriCloud