Refine code.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10648 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
vanjeff
2010-07-13 05:07:35 +00:00
parent 430fbbe096
commit 72ed3d7575
4 changed files with 175 additions and 21 deletions

View File

@@ -37,7 +37,7 @@ GetSubnetMaskPrefixLength (
//
// The SubnetMask is in network byte order.
//
ReverseMask = (SubnetMask->Addr[0] << 24) | (SubnetMask->Addr[1] << 16) | (SubnetMask->Addr[2] << 8) | (SubnetMask->Addr[3]);
ReverseMask = SwapBytes32 (*(UINT32 *)&SubnetMask[0]);
//
// Reverse it.