From 59ed6433dd84798da6a17366700b057218c04a3a Mon Sep 17 00:00:00 2001 From: Eric Dong Date: Wed, 6 Apr 2016 12:54:11 +0800 Subject: SecurityPkg TcgStorageOpalLib: Fixed gcc build failure. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong Reviewed-by: Feng Tian --- SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalCore.c | 2 +- SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalUtil.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'SecurityPkg') diff --git a/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalCore.c b/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalCore.c index 234909b13b..2db5ffeba9 100644 --- a/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalCore.c +++ b/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalCore.c @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ -#include +#include #include #include #include diff --git a/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalUtil.c b/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalUtil.c index 2d3ecb474c..d27a9c9b5f 100644 --- a/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalUtil.c +++ b/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalUtil.c @@ -11,7 +11,7 @@ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ -#include +#include #include #include #include @@ -853,8 +853,9 @@ OpalUtilDetermineOwnership( TCG_RESULT Ret; OPAL_OWNER_SHIP Owner; - NULL_CHECK(Session); - NULL_CHECK(Msid); + if ((Session == NULL) || (Msid == NULL)) { + return OpalOwnershipUnknown; + } Owner = OpalOwnershipUnknown; // -- cgit v1.2.3