Commit e57697a0 authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

oleaut32: Fix testing of HRESULT types with not operator instead of comparing against S_OK.

This makes it more obvious what the code is doing.
parent 064b6fce
......@@ -1191,7 +1191,7 @@ INT WINAPI DosDateTimeToVariantTime(USHORT wDosDate, USHORT wDosTime,
ud.st.wSecond = DOS_SECOND(wDosTime);
ud.st.wDayOfWeek = ud.st.wMilliseconds = 0;
return !VarDateFromUdate(&ud, 0, pDateOut);
return VarDateFromUdate(&ud, 0, pDateOut) == S_OK;
}
/**********************************************************************
......@@ -1255,7 +1255,7 @@ INT WINAPI SystemTimeToVariantTime(LPSYSTEMTIME lpSt, double *pDateOut)
return FALSE;
ud.st = *lpSt;
return !VarDateFromUdate(&ud, 0, pDateOut);
return VarDateFromUdate(&ud, 0, pDateOut) == S_OK;
}
/***********************************************************************
......
......@@ -5179,7 +5179,7 @@ static HRESULT VARIANT_DI_div(const VARIANT_DI * dividend, const VARIANT_DI * di
to multiply quotient by 10 (without overflowing), while adjusting the scale,
until scale is 0. If this cannot be done, it is a real overflow.
*/
while (!r_overflow && quotientscale < 0) {
while (r_overflow == S_OK && quotientscale < 0) {
memset(remainderplusquotient, 0, sizeof(remainderplusquotient));
memcpy(remainderplusquotient, quotient->bitsnum, sizeof(quotient->bitsnum));
VARIANT_int_mulbychar(remainderplusquotient, sizeof(remainderplusquotient)/sizeof(DWORD), 10);
......@@ -5189,7 +5189,7 @@ static HRESULT VARIANT_DI_div(const VARIANT_DI * dividend, const VARIANT_DI * di
memcpy(quotient->bitsnum, remainderplusquotient, sizeof(quotient->bitsnum));
} else r_overflow = DISP_E_OVERFLOW;
}
if (!r_overflow) {
if (r_overflow == S_OK) {
if (quotientscale <= 255) quotient->scale = quotientscale;
else VARIANT_DI_clear(quotient);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment