summaryrefslogtreecommitdiff
path: root/MdePkg/Library/BaseLib/SwapBytes32.c
diff options
context:
space:
mode:
Diffstat (limited to 'MdePkg/Library/BaseLib/SwapBytes32.c')
-rw-r--r--MdePkg/Library/BaseLib/SwapBytes32.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/MdePkg/Library/BaseLib/SwapBytes32.c b/MdePkg/Library/BaseLib/SwapBytes32.c
index 4e683b09d1..09396dba4e 100644
--- a/MdePkg/Library/BaseLib/SwapBytes32.c
+++ b/MdePkg/Library/BaseLib/SwapBytes32.c
@@ -32,8 +32,11 @@ SwapBytes32 (
IN UINT32 Operand
)
{
- return (UINT32)(
- ((UINT32)SwapBytes16 ((UINT16)Operand) << 16) |
- ((UINT32)SwapBytes16 ((UINT16)(Operand >> 16)))
- );
+ UINT32 LowerBytes;
+ UINT32 HigherBytes;
+
+ LowerBytes = (UINT32) SwapBytes16 ((UINT16) Operand);
+ HigherBytes = (UINT32) SwapBytes16 ((UINT16) (Operand >> 16));
+
+ return (LowerBytes << 16 | HigherBytes);
}