X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdePkg%2FLibrary%2FBaseLib%2FSwapBytes32.c;h=09396dba4e25599904830d1cac953c3b82711bb0;hp=4e683b09d18d397619d67ef02caecc572480cb15;hb=582510249f2fb1334e507b99421b9485f6b89159;hpb=ba3a1cb5bb97ffdea980f188fbd14b08200aeac6 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); }