summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2007-10-06 21:52:22 +0000
committermdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2007-10-06 21:52:22 +0000
commita326286cb1b3b80e31e1c21cf9a60200d9bb77df (patch)
tree08ef41c04c9bbfe6626452e304b5a380d7fe9fb6
parentfd51bf702f21d583c8f2c3d3ebf647fcf7807df3 (diff)
downloadedk2-platforms-a326286cb1b3b80e31e1c21cf9a60200d9bb77df.tar.xz
Sync with other libs
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4031 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--MdePkg/Library/BaseMemoryLibRepStr/MemLibGuid.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/MdePkg/Library/BaseMemoryLibRepStr/MemLibGuid.c b/MdePkg/Library/BaseMemoryLibRepStr/MemLibGuid.c
index c13cd462e4..cbbad2cb5d 100644
--- a/MdePkg/Library/BaseMemoryLibRepStr/MemLibGuid.c
+++ b/MdePkg/Library/BaseMemoryLibRepStr/MemLibGuid.c
@@ -26,6 +26,7 @@
//
#include "MemLibInternals.h"
+
/**
Copies a source GUID to a destination GUID.
@@ -80,22 +81,17 @@ CompareGuid (
IN CONST GUID *Guid2
)
{
- UINT64 Guid1ValueLo;
- UINT64 Guid1ValueHi;
- UINT64 Guid2ValueLo;
- UINT64 Guid2ValueHi;
-
- Guid1ValueLo = ReadUnaligned64 ((CONST UINT64*)Guid1);
- Guid2ValueLo = ReadUnaligned64 ((CONST UINT64*)Guid2);
-
- Guid1ValueHi = ReadUnaligned64 ((CONST UINT64*)Guid1 + 1);
- Guid2ValueHi = ReadUnaligned64 ((CONST UINT64*)Guid2 + 1);
+ UINT64 LowPartOfGuid1;
+ UINT64 LowPartOfGuid2;
+ UINT64 HighPartOfGuid1;
+ UINT64 HighPartOfGuid2;
+ LowPartOfGuid1 = ReadUnaligned64 ((CONST UINT64*) Guid1);
+ LowPartOfGuid2 = ReadUnaligned64 ((CONST UINT64*) Guid2);
+ HighPartOfGuid1 = ReadUnaligned64 ((CONST UINT64*) Guid1 + 1);
+ HighPartOfGuid2 = ReadUnaligned64 ((CONST UINT64*) Guid2 + 1);
- return (BOOLEAN)
- ((Guid1ValueLo == Guid2ValueLo) &&
- (Guid1ValueHi == Guid2ValueHi)
- );
+ return (BOOLEAN) (LowPartOfGuid1 == LowPartOfGuid2 && HighPartOfGuid1 == HighPartOfGuid2);
}
/**