summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MdePkg/Include/Base.h2
-rw-r--r--MdePkg/Include/Library/DebugLib.h8
2 files changed, 5 insertions, 5 deletions
diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h
index 4613ea011d..a90a67b98f 100644
--- a/MdePkg/Include/Base.h
+++ b/MdePkg/Include/Base.h
@@ -274,7 +274,7 @@ typedef CHAR8 *VA_LIST;
@return A pointer to the structure from one of it's elements.
**/
-#define _CR(Record, TYPE, Field) ((TYPE *) ((CHAR8 *) (Record) - (CHAR8 *) &(((TYPE *) 0)->Field)))
+#define BASE_CR(Record, TYPE, Field) ((TYPE *) ((CHAR8 *) (Record) - (CHAR8 *) &(((TYPE *) 0)->Field)))
/**
Rounds a value up to the next boundary using a specified alignment.
diff --git a/MdePkg/Include/Library/DebugLib.h b/MdePkg/Include/Library/DebugLib.h
index 0c07aab5fb..764bccc87c 100644
--- a/MdePkg/Include/Library/DebugLib.h
+++ b/MdePkg/Include/Library/DebugLib.h
@@ -438,9 +438,9 @@ DebugClearMemoryEnabled (
@param TestSignature The 32-bit signature value to match.
**/
-#define CR(Record, TYPE, Field, TestSignature) \
- (DebugAssertEnabled () && (_CR (Record, TYPE, Field)->Signature != TestSignature)) ? \
- (TYPE *) (_ASSERT (CR has Bad Signature), Record) : \
- _CR (Record, TYPE, Field)
+#define CR(Record, TYPE, Field, TestSignature) \
+ (DebugAssertEnabled () && (BASE_CR (Record, TYPE, Field)->Signature != TestSignature)) ? \
+ (TYPE *) (_ASSERT (CR has Bad Signature), Record) : \
+ BASE_CR (Record, TYPE, Field)
#endif