summaryrefslogtreecommitdiff
path: root/MdePkg
diff options
context:
space:
mode:
authormdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2006-11-09 22:01:56 +0000
committermdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2006-11-09 22:01:56 +0000
commitb5b60e8b4975a3f7c9ddf4a59c28fe971414d179 (patch)
treeca76d5793004b0120d0c21db6e3de79f5be1edb4 /MdePkg
parente7e9595aaf2e4e9badfa79d43bce7befaf344563 (diff)
downloadedk2-platforms-b5b60e8b4975a3f7c9ddf4a59c28fe971414d179.tar.xz
Fix ALIGN_POINTER() macro. The pointer (p) passed in must always be converted to (UINTN) prior to performing math operations.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1922 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg')
-rw-r--r--MdePkg/Include/Common/BaseTypes.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/MdePkg/Include/Common/BaseTypes.h b/MdePkg/Include/Common/BaseTypes.h
index 3935919300..92e9c141f7 100644
--- a/MdePkg/Include/Common/BaseTypes.h
+++ b/MdePkg/Include/Common/BaseTypes.h
@@ -139,7 +139,7 @@ typedef CHAR8 *VA_LIST;
///
/// ALIGN_POINTER - aligns a pointer to the lowest boundry
///
-#define ALIGN_POINTER(p, s) ((VOID *) ((p) + (((s) - ((UINTN) (p))) & ((s) - 1))))
+#define ALIGN_POINTER(p, s) ((VOID *) ((UINTN)(p) + (((s) - ((UINTN) (p))) & ((s) - 1))))
///
/// ALIGN_VARIABLE - aligns a variable up to the next natural boundry for int size of a processor