Actually, don't rely on the unsafe MAX() macro. Use imax() as provided

in the PR patch.

Pointed out by:		bde
PR:			123542
This commit is contained in:
Rui Paulo 2008-05-14 09:57:21 +00:00
parent bc42e6c43f
commit dab9b0941d

View File

@ -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);