]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseStackCheckLib/BaseStackCheckGcc.c
MdePkg: Apply uncrustify changes
[mirror_edk2.git] / MdePkg / Library / BaseStackCheckLib / BaseStackCheckGcc.c
index d3efb8e4622c14ddda1196fcb28d248e82c9ede4..0d2918668e238b07556e000af2491895b3fc4a31 100644 (file)
 #include <Library/PcdLib.h>\r
 \r
 /// "canary" value that is inserted by the compiler into the stack frame.\r
 #include <Library/PcdLib.h>\r
 \r
 /// "canary" value that is inserted by the compiler into the stack frame.\r
-VOID *__stack_chk_guard = (VOID*)0x0AFF;\r
+VOID  *__stack_chk_guard = (VOID *)0x0AFF;\r
 \r
 // If ASLR was enabled we could use\r
 \r
 // If ASLR was enabled we could use\r
-//void (*__stack_chk_guard)(void) = __stack_chk_fail;\r
+// void (*__stack_chk_guard)(void) = __stack_chk_fail;\r
 \r
 /**\r
  Error path for compiler generated stack "canary" value check code. If the\r
 \r
 /**\r
  Error path for compiler generated stack "canary" value check code. If the\r
@@ -29,12 +29,12 @@ VOID *__stack_chk_guard = (VOID*)0x0AFF;
 **/\r
 VOID\r
 __stack_chk_fail (\r
 **/\r
 VOID\r
 __stack_chk_fail (\r
- VOID\r
- )\r
 VOID\r
 )\r
 {\r
 {\r
-  UINT8 DebugPropertyMask;\r
+  UINT8  DebugPropertyMask;\r
 \r
 \r
-  DEBUG ((DEBUG_ERROR, "STACK FAULT: Buffer Overflow in function %a.\n", __builtin_return_address(0)));\r
+  DEBUG ((DEBUG_ERROR, "STACK FAULT: Buffer Overflow in function %a.\n", __builtin_return_address (0)));\r
 \r
   //\r
   // Generate a Breakpoint, DeadLoop, or NOP based on PCD settings even if\r
 \r
   //\r
   // Generate a Breakpoint, DeadLoop, or NOP based on PCD settings even if\r
@@ -44,6 +44,6 @@ __stack_chk_fail (
   if ((DebugPropertyMask & DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED) != 0) {\r
     CpuBreakpoint ();\r
   } else if ((DebugPropertyMask & DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED) != 0) {\r
   if ((DebugPropertyMask & DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED) != 0) {\r
     CpuBreakpoint ();\r
   } else if ((DebugPropertyMask & DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED) != 0) {\r
-   CpuDeadLoop ();\r
+    CpuDeadLoop ();\r
   }\r
 }\r
   }\r
 }\r