summaryrefslogtreecommitdiff
path: root/MdePkg/Include/Base.h
diff options
context:
space:
mode:
authormdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2009-02-14 02:14:37 +0000
committermdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2009-02-14 02:14:37 +0000
commit262ffea8ec8b407ecc5396d3b0a37ba7678ba805 (patch)
tree746099ebb6cc39817fea35a47e9e6dd5935a5ba0 /MdePkg/Include/Base.h
parentc00bdbb14ae126f1f614f396eae19a36afc863c6 (diff)
downloadedk2-platforms-262ffea8ec8b407ecc5396d3b0a37ba7678ba805.tar.xz
Update macros to make sure all RETURN_STATUS constants are defined to be of type RETURN_STATUS.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7526 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Include/Base.h')
-rw-r--r--MdePkg/Include/Base.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h
index 33d192cd5f..00cce609f5 100644
--- a/MdePkg/Include/Base.h
+++ b/MdePkg/Include/Base.h
@@ -521,7 +521,7 @@ typedef INTN RETURN_STATUS;
@return The value specified by StatusCode with the highest bit set.
**/
-#define ENCODE_ERROR(StatusCode) (MAX_BIT | (StatusCode))
+#define ENCODE_ERROR(StatusCode) ((RETURN_STATUS)(MAX_BIT | (StatusCode)))
/**
Produces a RETURN_STATUS code with the highest bit clear.
@@ -532,7 +532,7 @@ typedef INTN RETURN_STATUS;
@return The value specified by StatusCode with the highest bit clear.
**/
-#define ENCODE_WARNING(StatusCode) (StatusCode)
+#define ENCODE_WARNING(StatusCode) ((RETURN_STATUS)(StatusCode))
/**
Returns TRUE if a specified RETURN_STATUS code is an error code.
@@ -545,7 +545,7 @@ typedef INTN RETURN_STATUS;
@retval FALSE The high bit of StatusCode is clear.
**/
-#define RETURN_ERROR(StatusCode) ((INTN) (StatusCode) < 0)
+#define RETURN_ERROR(StatusCode) (((RETURN_STATUS)(StatusCode)) < 0)
///
/// The operation completed successfully.