summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
67513de)
2. Fix one bug for GetPowerOfTwo32.c and GetPowerOfTwo64.c, when Operand is 1, 1 should be returned
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@873
6f19259b-4bc3-4df7-8a09-
765794883524
-\r
- return (BitPos = HighBitSet32 (Operand)) > 0 ? 1ul << BitPos : 0;\r
+ \r
+ BitPos = HighBitSet32 (Operand);\r
+ return BitPos >= 0 ? 1ul << BitPos : 0;\r
- return (BitPos = HighBitSet64 (Operand)) > 0 ? LShiftU64 (1, BitPos) : 0;\r
+ BitPos = HighBitSet64 (Operand);\r
+ return BitPos >= 0 ? LShiftU64 (1, BitPos) : 0;\r