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.
This commit is contained in:
Rob Shearman 2008-08-17 18:31:17 +01:00 committed by Alexandre Julliard
parent 064b6fce0c
commit e57697a04b
2 changed files with 4 additions and 4 deletions

View File

@ -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;
}
/***********************************************************************

View File

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