REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3688
Use DEBUG_LINE_NUMBER instead of __LINE__.
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Michael Kubacki <michael.kubacki@microsoft.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
.../Include/Library/TcgStorageCoreLib.h | 26 +++++++++----------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/SecurityPkg/Include/Library/TcgStorageCoreLib.h b/SecurityPkg/Include/Library/TcgStorageCoreLib.h
index 01a44c667c80..a426251d6978 100644
--- a/SecurityPkg/Include/Library/TcgStorageCoreLib.h
+++ b/SecurityPkg/Include/Library/TcgStorageCoreLib.h
@@ -16,13 +16,13 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#include <IndustryStandard/TcgStorageCore.h>
-#define ERROR_CHECK(arg) \
- { \
- TCG_RESULT ret = (arg); \
- if (ret != TcgResultSuccess) { \
- DEBUG ((DEBUG_INFO, "ERROR_CHECK failed at %a:%u\n", __FILE__, __LINE__)); \
- return ret; \
- } \
+#define ERROR_CHECK(arg) \
+ { \
+ TCG_RESULT ret = (arg); \
+ if (ret != TcgResultSuccess) { \
+ DEBUG ((DEBUG_INFO, "ERROR_CHECK failed at %a:%u\n", __FILE__, DEBUG_LINE_NUMBER)); \
+ return ret; \
+ } \
}
#define METHOD_STATUS_ERROR_CHECK(arg, failRet) \
@@ -31,12 +31,12 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
return (failRet); \
}
-#define NULL_CHECK(arg) \
- do { \
- if ((arg) == NULL) { \
- DEBUG ((DEBUG_INFO, "NULL_CHECK(%a) failed at %a:%u\n", #arg, __FILE__, __LINE__)); \
- return TcgResultFailureNullPointer; \
- } \
+#define NULL_CHECK(arg) \
+ do { \
+ if ((arg) == NULL) { \
+ DEBUG ((DEBUG_INFO, "NULL_CHECK(%a) failed at %a:%u\n", #arg, __FILE__, DEBUG_LINE_NUMBER)); \
+ return TcgResultFailureNullPointer; \
+ } \
} while (0)
#pragma pack(1)
--
2.32.0.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#83060): https://edk2.groups.io/g/devel/message/83060
Mute This Topic: https://groups.io/mt/86752907/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
> -----Original Message-----
> From: Kinney, Michael D <michael.d.kinney@intel.com>
> Sent: Tuesday, November 2, 2021 5:38 AM
> To: devel@edk2.groups.io
> Cc: Yao, Jiewen <jiewen.yao@intel.com>; Wang, Jian J <jian.j.wang@intel.com>;
> Michael Kubacki <michael.kubacki@microsoft.com>
> Subject: [Patch V2 6/7] SecurityPkg: Reproduce builds across source format
> changes
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3688
>
> Use DEBUG_LINE_NUMBER instead of __LINE__.
>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Cc: Michael Kubacki <michael.kubacki@microsoft.com>
> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
> ---
> .../Include/Library/TcgStorageCoreLib.h | 26 +++++++++----------
> 1 file changed, 13 insertions(+), 13 deletions(-)
>
> diff --git a/SecurityPkg/Include/Library/TcgStorageCoreLib.h
> b/SecurityPkg/Include/Library/TcgStorageCoreLib.h
> index 01a44c667c80..a426251d6978 100644
> --- a/SecurityPkg/Include/Library/TcgStorageCoreLib.h
> +++ b/SecurityPkg/Include/Library/TcgStorageCoreLib.h
> @@ -16,13 +16,13 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
>
> #include <IndustryStandard/TcgStorageCore.h>
>
> -#define ERROR_CHECK(arg) \
> - { \
> - TCG_RESULT ret = (arg); \
> - if (ret != TcgResultSuccess) { \
> - DEBUG ((DEBUG_INFO, "ERROR_CHECK failed at %a:%u\n", __FILE__,
> __LINE__)); \
> - return ret; \
> - } \
> +#define ERROR_CHECK(arg) \
> + { \
> + TCG_RESULT ret = (arg); \
> + if (ret != TcgResultSuccess) { \
> + DEBUG ((DEBUG_INFO, "ERROR_CHECK failed at %a:%u\n", __FILE__,
> DEBUG_LINE_NUMBER)); \
> + return ret; \
> + } \
> }
>
> #define METHOD_STATUS_ERROR_CHECK(arg, failRet)
> \
> @@ -31,12 +31,12 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
> return (failRet); \
> }
>
> -#define NULL_CHECK(arg) \
> - do { \
> - if ((arg) == NULL) { \
> - DEBUG ((DEBUG_INFO, "NULL_CHECK(%a) failed at %a:%u\n", #arg,
> __FILE__, __LINE__)); \
> - return TcgResultFailureNullPointer; \
> - } \
> +#define NULL_CHECK(arg) \
> + do { \
> + if ((arg) == NULL) { \
> + DEBUG ((DEBUG_INFO, "NULL_CHECK(%a) failed at %a:%u\n", #arg,
> __FILE__, DEBUG_LINE_NUMBER)); \
> + return TcgResultFailureNullPointer; \
> + } \
> } while (0)
>
> #pragma pack(1)
> --
> 2.32.0.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#83066): https://edk2.groups.io/g/devel/message/83066
Mute This Topic: https://groups.io/mt/86752907/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
© 2016 - 2026 Red Hat, Inc.