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
This commit is contained in:
mdkinney 2006-11-09 22:01:56 +00:00
parent e7e9595aaf
commit b5b60e8b49
1 changed files with 1 additions and 1 deletions

View File

@ -139,7 +139,7 @@ typedef CHAR8 *VA_LIST;
/// ///
/// ALIGN_POINTER - aligns a pointer to the lowest boundry /// 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 /// ALIGN_VARIABLE - aligns a variable up to the next natural boundry for int size of a processor