]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Changing unsigned int into UINTN according to code review comments.
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 24 Sep 2008 08:31:38 +0000 (08:31 +0000)
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 24 Sep 2008 08:31:38 +0000 (08:31 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5960 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Library/BaseLib/BaseLibInternals.h
MdePkg/Library/BaseLib/BitField.c

index 9c6044b606908d12e73b9317f201fb6045286817..3d47a2153551c105f75bcbfd9fb67d94987d65a5 100644 (file)
@@ -472,10 +472,10 @@ InternalSyncCompareExchange64 (
   @return The bit field read.\r
 \r
 **/\r
-unsigned int\r
+UINTN\r
 EFIAPI\r
 BitFieldReadUint (\r
-  IN      unsigned int              Operand,\r
+  IN      UINTN                     Operand,\r
   IN      UINTN                     StartBit,\r
   IN      UINTN                     EndBit\r
   );\r
@@ -497,13 +497,13 @@ BitFieldReadUint (
   @return The new value.\r
 \r
 **/\r
-unsigned int\r
+UINTN\r
 EFIAPI\r
 BitFieldOrUint (\r
-  IN      unsigned int              Operand,\r
+  IN      UINTN                     Operand,\r
   IN      UINTN                     StartBit,\r
   IN      UINTN                     EndBit,\r
-  IN      unsigned int              OrData\r
+  IN      UINTN                     OrData\r
   );\r
 \r
 \r
@@ -523,13 +523,13 @@ BitFieldOrUint (
   @return The new value.\r
 \r
 **/\r
-unsigned int\r
+UINTN\r
 EFIAPI\r
 BitFieldAndUint (\r
-  IN      unsigned int              Operand,\r
+  IN      UINTN                     Operand,\r
   IN      UINTN                     StartBit,\r
   IN      UINTN                     EndBit,\r
-  IN      unsigned int              AndData\r
+  IN      UINTN                     AndData\r
   );\r
 \r
 \r
index 8c713b29bd2edf8b9d858ac2dc4d5d071a152bc7..533a07564641cb01f1b0ccb2e25e01e2f37a0121 100644 (file)
   @return The bit field read.\r
 \r
 **/\r
-unsigned int\r
+UINTN\r
 EFIAPI\r
 BitFieldReadUint (\r
-  IN      unsigned int              Operand,\r
+  IN      UINTN                     Operand,\r
   IN      UINTN                     StartBit,\r
   IN      UINTN                     EndBit\r
   )\r
 {\r
   //\r
-  // ~((unsigned int)-2 << EndBit) is a mask in which bit[0] thru bit[EndBit]\r
+  // ~((UINTN)-2 << EndBit) is a mask in which bit[0] thru bit[EndBit]\r
   // are 1's while bit[EndBit + 1] thru the most significant bit are 0's.\r
   //\r
-  return (Operand & ~((unsigned int)-2 << EndBit)) >> StartBit;\r
+  return (Operand & ~((UINTN)-2 << EndBit)) >> StartBit;\r
 }\r
 \r
 /**\r
@@ -57,20 +57,20 @@ BitFieldReadUint (
   @return The new value.\r
 \r
 **/\r
-unsigned int\r
+UINTN\r
 EFIAPI\r
 BitFieldOrUint (\r
-  IN      unsigned int              Operand,\r
+  IN      UINTN                     Operand,\r
   IN      UINTN                     StartBit,\r
   IN      UINTN                     EndBit,\r
-  IN      unsigned int              OrData\r
+  IN      UINTN                     OrData\r
   )\r
 {\r
   //\r
-  // ~((unsigned int)-2 << EndBit) is a mask in which bit[0] thru bit[EndBit]\r
+  // ~((UINTN)-2 << EndBit) is a mask in which bit[0] thru bit[EndBit]\r
   // are 1's while bit[EndBit + 1] thru the most significant bit are 0's.\r
   //\r
-  return Operand | ((OrData << StartBit) & ~((unsigned int) -2 << EndBit));\r
+  return Operand | ((OrData << StartBit) & ~((UINTN) -2 << EndBit));\r
 }\r
 \r
 /**\r
@@ -89,20 +89,20 @@ BitFieldOrUint (
   @return The new value.\r
 \r
 **/\r
-unsigned int\r
+UINTN\r
 EFIAPI\r
 BitFieldAndUint (\r
-  IN      unsigned int              Operand,\r
+  IN      UINTN                     Operand,\r
   IN      UINTN                     StartBit,\r
   IN      UINTN                     EndBit,\r
-  IN      unsigned int              AndData\r
+  IN      UINTN                     AndData\r
   )\r
 {\r
   //\r
-  // ~((unsigned int)-2 << EndBit) is a mask in which bit[0] thru bit[EndBit]\r
+  // ~((UINTN)-2 << EndBit) is a mask in which bit[0] thru bit[EndBit]\r
   // are 1's while bit[EndBit + 1] thru the most significant bit are 0's.\r
   //\r
-  return Operand & ~((~AndData << StartBit) & ~((unsigned int) -2 << EndBit));\r
+  return Operand & ~((~AndData << StartBit) & ~((UINTN)-2 << EndBit));\r
 }\r
 \r
 /**\r