Fix remainung RtlBitmapApi tests

svn path=/trunk/; revision=56799
This commit is contained in:
Timo Kreuzer 2012-06-24 18:33:08 +00:00
parent 1e6ffd8f10
commit fd6fcab2ca

View file

@ -450,10 +450,14 @@ RtlFindClearBits(
return MAXULONG;
}
/* Check if the hint is outside the bitmap */
if (HintIndex >= BitMapHeader->SizeOfBitMap) HintIndex = 0;
/* Check for trivial case */
if (NumberToFind == 0)
{
return HintIndex;
/* Return hint rounded down to byte margin */
return HintIndex & ~7;
}
/* First margin is end of bitmap */
@ -514,10 +518,14 @@ RtlFindSetBits(
return MAXULONG;
}
/* Check if the hint is outside the bitmap */
if (HintIndex >= BitMapHeader->SizeOfBitMap) HintIndex = 0;
/* Check for trivial case */
if (NumberToFind == 0)
{
return HintIndex;
/* Return hint rounded down to byte margin */
return HintIndex & ~7;
}
/* First margin is end of bitmap */