diff --git a/lib/soft386/common.inl b/lib/soft386/common.inl index 170ef61ec23..7a218d82d2a 100644 --- a/lib/soft386/common.inl +++ b/lib/soft386/common.inl @@ -436,10 +436,7 @@ FORCEINLINE BOOLEAN Soft386CalculateParity(UCHAR Number) { - Number ^= Number >> 1; - Number ^= Number >> 2; - Number ^= Number >> 4; - return !(Number & 1); + return (0x9669 >> ((Number & 0x0F) ^ (Number >> 4))) & 1; } FORCEINLINE