]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdePkg Base.h: Use correct style to check the defined macro
authorLiming Gao <liming.gao@intel.com>
Thu, 16 Jan 2020 03:48:05 +0000 (11:48 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Fri, 17 Jan 2020 00:57:34 +0000 (00:57 +0000)
#if MACRO is not good style. It should be changed to
#ifdef MACRO style or #if defined (MACRO) style.

Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
MdePkg/Include/Base.h

index e0bcd0ae67a27eb26b331dc8b5995a372222a4a0..321d729c04b4e94326bd21aea62b416e4055dc2e 100644 (file)
@@ -195,7 +195,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 ///\r
 #define ASM_PFX(name) _CONCATENATE (__USER_LABEL_PREFIX__, name)\r
 \r
-#if __APPLE__\r
+#ifdef __APPLE__\r
   //\r
   // Apple extension that is used by the linker to optimize code size\r
   // with assembly functions. Put at the end of your .S files\r
@@ -799,7 +799,7 @@ typedef UINTN  *BASE_LIST;
 **/\r
 #ifdef MDE_CPU_EBC\r
   #define STATIC_ASSERT(Expression, Message)\r
-#elif _MSC_EXTENSIONS\r
+#elif defined(_MSC_EXTENSIONS)\r
   #define STATIC_ASSERT static_assert\r
 #else\r
   #define STATIC_ASSERT _Static_assert\r