Update coding style of Nt32OemHookStatusCodeLib.c
authoryshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 5 Sep 2006 02:39:09 +0000 (02:39 +0000)
committeryshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 5 Sep 2006 02:39:09 +0000 (02:39 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1446 6f19259b-4bc3-4df7-8a09-765794883524

EdkNt32Pkg/Library/Nt32OemHookStatusCodeLib/Nt32OemHookStatusCodeLib.c

index de30da9..a17b466 100644 (file)
 \r
 //\r
 // Cache of WinNtThunk protocol \r
-// \r
+//\r
+STATIC\r
 EFI_WIN_NT_THUNK_PROTOCOL   *mWinNt;\r
 \r
 //\r
 // Cache of standard output handle . \r
-// \r
+//\r
+STATIC\r
 HANDLE                      mStdOut;\r
 \r
 /**\r
@@ -47,11 +49,11 @@ OemHookStatusCodeInitialize (
     // Locate NtThunkPpi for retrieving standard output handle\r
     //\r
     Status = PeiServicesLocatePpi (\r
-              &gPeiNtThunkPpiGuid,\r
-              0,\r
-              NULL,\r
-              (VOID **) &NtThunkPpi\r
-              );\r
+               &gPeiNtThunkPpiGuid,\r
+               0,\r
+               NULL,\r
+               (VOID **) &NtThunkPpi\r
+               );\r
 \r
     ASSERT_EFI_ERROR (Status);\r
 \r
@@ -181,7 +183,14 @@ OemHookStatusCodeReport (
     //\r
     // Print ERROR information into output buffer.\r
     //\r
-    CharCount = AsciiSPrint (Buffer, EFI_STATUS_CODE_DATA_MAX_SIZE, "ERROR: C%x:V%x I%x", CodeType, Value, Instance);\r
+    CharCount = AsciiSPrint (\r
+                  Buffer, \r
+                  EFI_STATUS_CODE_DATA_MAX_SIZE, \r
+                  "ERROR: C%x:V%x I%x", \r
+                  CodeType, \r
+                  Value, \r
+                  Instance\r
+                  );\r
 \r
     //\r
     // Make sure we don't try to print values that weren't intended to be printed, especially NULL GUID pointers.\r
@@ -196,7 +205,7 @@ OemHookStatusCodeReport (
                      );\r
     }\r
 \r
-    if (Data) {\r
+    if (Data != NULL) {\r
       CharCount += AsciiSPrint (\r
                      &Buffer[CharCount - 1],\r
                      (EFI_STATUS_CODE_DATA_MAX_SIZE - (sizeof (Buffer[0]) * CharCount)),\r
@@ -211,9 +220,22 @@ OemHookStatusCodeReport (
                    "\n\r"\r
                    );\r
   } else if ((CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_PROGRESS_CODE) {\r
-    CharCount = AsciiSPrint (Buffer, EFI_STATUS_CODE_DATA_MAX_SIZE, "PROGRESS CODE: V%x I%x\n\r", Value, Instance);\r
+    CharCount = AsciiSPrint (\r
+                  Buffer, \r
+                  EFI_STATUS_CODE_DATA_MAX_SIZE, \r
+                  "PROGRESS CODE: V%x I%x\n\r", \r
+                  Value, \r
+                  Instance\r
+                  );\r
   } else {\r
-    CharCount = AsciiSPrint (Buffer, EFI_STATUS_CODE_DATA_MAX_SIZE, "Undefined: C%x:V%x I%x\n\r", CodeType, Value, Instance);\r
+    CharCount = AsciiSPrint (\r
+                  Buffer, \r
+                  EFI_STATUS_CODE_DATA_MAX_SIZE, \r
+                  "Undefined: C%x:V%x I%x\n\r", \r
+                  CodeType, \r
+                  Value, \r
+                  Instance\r
+                  );\r
   }\r
 \r
   //\r