INT32\r
EFIAPI\r
TestAndClearBit (\r
- IN INT32 Bit,\r
- IN VOID *Address\r
+ IN INT32 Bit,\r
+ IN VOID *Address\r
)\r
{\r
- UINT16 Word, Read;\r
- UINT16 Mask;\r
+ UINT16 Word, Read;\r
+ UINT16 Mask;\r
\r
//\r
// Calculate the effective address relative to 'Address' based on the\r
// ensure we round towards -Inf, and end up with a positive shift in\r
// 'Bit', even if 'Bit' itself is negative.\r
//\r
- Address = (VOID*)((UINT8*) Address + ((Bit >> 4) * sizeof(UINT16)));\r
- Mask = 1U << (Bit & 15);\r
+ Address = (VOID *)((UINT8 *)Address + ((Bit >> 4) * sizeof (UINT16)));\r
+ Mask = 1U << (Bit & 15);\r
\r
- for (Word = *(UINT16 *) Address; Word & Mask; Word = Read) {\r
+ for (Word = *(UINT16 *)Address; Word &Mask; Word = Read) {\r
Read = InterlockedCompareExchange16 (Address, Word, Word & ~Mask);\r
if (Read == Word) {\r
return 1;\r
}\r
}\r
+\r
return 0;\r
}\r