Fixed some various comparisons wrt signedness.
This commit is contained in:
parent
bf50153479
commit
e35580f4c9
|
@ -198,7 +198,7 @@ static LRESULT WINAPI ButtonWndProc_common(HWND hWnd, UINT uMsg,
|
|||
checkBoxWidth = bmp.bmWidth / 4;
|
||||
checkBoxHeight = bmp.bmHeight / 3;
|
||||
}
|
||||
if (btn_type < 0L || btn_type >= MAX_BTN_TYPE)
|
||||
if (btn_type >= MAX_BTN_TYPE)
|
||||
return -1; /* abort */
|
||||
set_button_state( hWnd, BUTTON_UNCHECKED );
|
||||
return 0;
|
||||
|
|
|
@ -842,7 +842,7 @@ BOOL WINAPI CryptGetDefaultProviderA (DWORD dwProvType, DWORD *pdwReserved,
|
|||
CRYPT_ReturnLastError(ERROR_INVALID_PARAMETER);
|
||||
if (dwFlags & ~(CRYPT_USER_DEFAULT | CRYPT_MACHINE_DEFAULT))
|
||||
CRYPT_ReturnLastError(NTE_BAD_FLAGS);
|
||||
if (dwProvType < 0 || dwProvType > 999)
|
||||
if (dwProvType > 999)
|
||||
CRYPT_ReturnLastError(NTE_BAD_PROV_TYPE);
|
||||
if ( !(keyname = CRYPT_GetTypeKeyName(dwProvType, dwFlags & CRYPT_USER_DEFAULT)) )
|
||||
CRYPT_ReturnLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
|
@ -1129,7 +1129,7 @@ BOOL WINAPI CryptSetProviderExA (LPCSTR pszProvName, DWORD dwProvType, DWORD *pd
|
|||
|
||||
if (!pszProvName || pdwReserved)
|
||||
CRYPT_ReturnLastError(ERROR_INVALID_PARAMETER);
|
||||
if (dwProvType < 0 || dwProvType > MAXPROVTYPES)
|
||||
if (dwProvType > MAXPROVTYPES)
|
||||
CRYPT_ReturnLastError(NTE_BAD_PROV_TYPE);
|
||||
if (dwFlags & ~(CRYPT_MACHINE_DEFAULT | CRYPT_USER_DEFAULT | CRYPT_DELETE_DEFAULT)
|
||||
|| dwFlags == CRYPT_DELETE_DEFAULT)
|
||||
|
|
|
@ -1832,10 +1832,10 @@ static VOID LISTVIEW_ShiftIndices(HWND hwnd, INT nItem, INT direction)
|
|||
{
|
||||
checkselection = DPA_GetPtr(infoPtr->hdpaSelectionRanges,index);
|
||||
if ((checkselection->lower >= nItem)&&
|
||||
(checkselection->lower + direction >= 0))
|
||||
((int)(checkselection->lower + direction) >= 0))
|
||||
checkselection->lower += direction;
|
||||
if ((checkselection->upper >= nItem)&&
|
||||
(checkselection->upper + direction >=0))
|
||||
((int)(checkselection->upper + direction) >= 0))
|
||||
checkselection->upper += direction;
|
||||
index ++;
|
||||
}
|
||||
|
|
|
@ -288,8 +288,7 @@ static HRESULT WINAPI OleAdviseHolderImpl_Unadvise(
|
|||
/*
|
||||
* Check for invalid cookies.
|
||||
*/
|
||||
if ( (dwConnection < 0) ||
|
||||
(dwConnection >= This->maxSinks) )
|
||||
if (dwConnection >= This->maxSinks)
|
||||
return OLE_E_NOCONNECTION;
|
||||
|
||||
if (This->arrayOfSinks[dwConnection] == NULL)
|
||||
|
@ -647,8 +646,7 @@ static HRESULT WINAPI DataAdviseHolder_Unadvise(
|
|||
/*
|
||||
* Check for invalid cookies.
|
||||
*/
|
||||
if ( (dwConnection < 0) ||
|
||||
(dwConnection >= This->maxCons) )
|
||||
if (dwConnection >= This->maxCons)
|
||||
return OLE_E_NOCONNECTION;
|
||||
|
||||
if (This->Connections[dwConnection].sink == NULL)
|
||||
|
|
|
@ -4067,7 +4067,7 @@ HRESULT WINAPI VarUI2FromUI4(ULONG ulIn, USHORT* puiOut)
|
|||
{
|
||||
TRACE("( %ld, %p ), stub\n", ulIn, puiOut );
|
||||
|
||||
if( ulIn < UI2_MIN || ulIn > UI2_MAX )
|
||||
if( ulIn > UI2_MAX )
|
||||
{
|
||||
return DISP_E_OVERFLOW;
|
||||
}
|
||||
|
@ -4167,7 +4167,7 @@ HRESULT WINAPI VarUI4FromI4(LONG lIn, ULONG* pulOut)
|
|||
{
|
||||
TRACE("( %ld, %p ), stub\n", lIn, pulOut );
|
||||
|
||||
if( lIn < UI4_MIN )
|
||||
if( lIn < 0 )
|
||||
{
|
||||
return DISP_E_OVERFLOW;
|
||||
}
|
||||
|
@ -4885,7 +4885,7 @@ HRESULT WINAPI VarDateFromUdate(UDATE *pudateout,
|
|||
*/
|
||||
HRESULT WINAPI VarBstrCmp(BSTR left, BSTR right, LCID lcid, DWORD flags)
|
||||
{
|
||||
DWORD r;
|
||||
INT r;
|
||||
|
||||
TRACE("( %s %s %ld %lx ) partial stub\n", debugstr_w(left), debugstr_w(right), lcid, flags);
|
||||
|
||||
|
|
|
@ -1407,7 +1407,7 @@ static Window __get_top_decoration( Display *display, Window w, Window ancestor
|
|||
static unsigned __td_lookup( Window w, Window* list, unsigned max )
|
||||
{
|
||||
unsigned i;
|
||||
for( i = max - 1; i >= 0; i-- ) if( list[i] == w ) break;
|
||||
for( i = max; i > 0; i-- ) if( list[i - 1] == w ) break;
|
||||
return i;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue