summaryrefslogtreecommitdiff
path: root/MdePkg/Library/BaseLib/BitField.c
diff options
context:
space:
mode:
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2008-09-24 08:31:38 +0000
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2008-09-24 08:31:38 +0000
commit28ca72bc97766a314ea94c7749c6e73f067c57d6 (patch)
treebb4c62368bea797164cabe74f937c1e9769b79f6 /MdePkg/Library/BaseLib/BitField.c
parentce7a12fba0e5139536307f7ec8dcf89002e1fb64 (diff)
downloadedk2-platforms-28ca72bc97766a314ea94c7749c6e73f067c57d6.tar.xz
Changing unsigned int into UINTN according to code review comments.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5960 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library/BaseLib/BitField.c')
-rw-r--r--MdePkg/Library/BaseLib/BitField.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/MdePkg/Library/BaseLib/BitField.c b/MdePkg/Library/BaseLib/BitField.c
index 8c713b29bd..533a075646 100644
--- a/MdePkg/Library/BaseLib/BitField.c
+++ b/MdePkg/Library/BaseLib/BitField.c
@@ -26,19 +26,19 @@
@return The bit field read.
**/
-unsigned int
+UINTN
EFIAPI
BitFieldReadUint (
- IN unsigned int Operand,
+ IN UINTN Operand,
IN UINTN StartBit,
IN UINTN EndBit
)
{
//
- // ~((unsigned int)-2 << EndBit) is a mask in which bit[0] thru bit[EndBit]
+ // ~((UINTN)-2 << EndBit) is a mask in which bit[0] thru bit[EndBit]
// are 1's while bit[EndBit + 1] thru the most significant bit are 0's.
//
- return (Operand & ~((unsigned int)-2 << EndBit)) >> StartBit;
+ return (Operand & ~((UINTN)-2 << EndBit)) >> StartBit;
}
/**
@@ -57,20 +57,20 @@ BitFieldReadUint (
@return The new value.
**/
-unsigned int
+UINTN
EFIAPI
BitFieldOrUint (
- IN unsigned int Operand,
+ IN UINTN Operand,
IN UINTN StartBit,
IN UINTN EndBit,
- IN unsigned int OrData
+ IN UINTN OrData
)
{
//
- // ~((unsigned int)-2 << EndBit) is a mask in which bit[0] thru bit[EndBit]
+ // ~((UINTN)-2 << EndBit) is a mask in which bit[0] thru bit[EndBit]
// are 1's while bit[EndBit + 1] thru the most significant bit are 0's.
//
- return Operand | ((OrData << StartBit) & ~((unsigned int) -2 << EndBit));
+ return Operand | ((OrData << StartBit) & ~((UINTN) -2 << EndBit));
}
/**
@@ -89,20 +89,20 @@ BitFieldOrUint (
@return The new value.
**/
-unsigned int
+UINTN
EFIAPI
BitFieldAndUint (
- IN unsigned int Operand,
+ IN UINTN Operand,
IN UINTN StartBit,
IN UINTN EndBit,
- IN unsigned int AndData
+ IN UINTN AndData
)
{
//
- // ~((unsigned int)-2 << EndBit) is a mask in which bit[0] thru bit[EndBit]
+ // ~((UINTN)-2 << EndBit) is a mask in which bit[0] thru bit[EndBit]
// are 1's while bit[EndBit + 1] thru the most significant bit are 0's.
//
- return Operand & ~((~AndData << StartBit) & ~((unsigned int) -2 << EndBit));
+ return Operand & ~((~AndData << StartBit) & ~((UINTN)-2 << EndBit));
}
/**