summaryrefslogtreecommitdiffstats
path: root/EdkNt32Pkg
diff options
context:
space:
mode:
authoryshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524>2006-09-05 02:39:09 +0000
committeryshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524>2006-09-05 02:39:09 +0000
commitc84c226d0d5d1a8ff9859c0507d4fe4773eb949d (patch)
tree28fe4e388a0a94fe2b82398d879213b85ee961f0 /EdkNt32Pkg
parenta5e465a79f7a3ccf00314ba7fa6be275e1fde790 (diff)
downloadedk2-c84c226d0d5d1a8ff9859c0507d4fe4773eb949d.tar.gz
edk2-c84c226d0d5d1a8ff9859c0507d4fe4773eb949d.tar.bz2
edk2-c84c226d0d5d1a8ff9859c0507d4fe4773eb949d.zip
Update coding style of Nt32OemHookStatusCodeLib.c
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1446 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkNt32Pkg')
-rw-r--r--EdkNt32Pkg/Library/Nt32OemHookStatusCodeLib/Nt32OemHookStatusCodeLib.c44
1 files changed, 33 insertions, 11 deletions
diff --git a/EdkNt32Pkg/Library/Nt32OemHookStatusCodeLib/Nt32OemHookStatusCodeLib.c b/EdkNt32Pkg/Library/Nt32OemHookStatusCodeLib/Nt32OemHookStatusCodeLib.c
index de30da9a93..a17b466294 100644
--- a/EdkNt32Pkg/Library/Nt32OemHookStatusCodeLib/Nt32OemHookStatusCodeLib.c
+++ b/EdkNt32Pkg/Library/Nt32OemHookStatusCodeLib/Nt32OemHookStatusCodeLib.c
@@ -18,12 +18,14 @@
//
// Cache of WinNtThunk protocol
-//
+//
+STATIC
EFI_WIN_NT_THUNK_PROTOCOL *mWinNt;
//
// Cache of standard output handle .
-//
+//
+STATIC
HANDLE mStdOut;
/**
@@ -47,11 +49,11 @@ OemHookStatusCodeInitialize (
// Locate NtThunkPpi for retrieving standard output handle
//
Status = PeiServicesLocatePpi (
- &gPeiNtThunkPpiGuid,
- 0,
- NULL,
- (VOID **) &NtThunkPpi
- );
+ &gPeiNtThunkPpiGuid,
+ 0,
+ NULL,
+ (VOID **) &NtThunkPpi
+ );
ASSERT_EFI_ERROR (Status);
@@ -181,7 +183,14 @@ OemHookStatusCodeReport (
//
// Print ERROR information into output buffer.
//
- CharCount = AsciiSPrint (Buffer, EFI_STATUS_CODE_DATA_MAX_SIZE, "ERROR: C%x:V%x I%x", CodeType, Value, Instance);
+ CharCount = AsciiSPrint (
+ Buffer,
+ EFI_STATUS_CODE_DATA_MAX_SIZE,
+ "ERROR: C%x:V%x I%x",
+ CodeType,
+ Value,
+ Instance
+ );
//
// Make sure we don't try to print values that weren't intended to be printed, especially NULL GUID pointers.
@@ -196,7 +205,7 @@ OemHookStatusCodeReport (
);
}
- if (Data) {
+ if (Data != NULL) {
CharCount += AsciiSPrint (
&Buffer[CharCount - 1],
(EFI_STATUS_CODE_DATA_MAX_SIZE - (sizeof (Buffer[0]) * CharCount)),
@@ -211,9 +220,22 @@ OemHookStatusCodeReport (
"\n\r"
);
} else if ((CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_PROGRESS_CODE) {
- CharCount = AsciiSPrint (Buffer, EFI_STATUS_CODE_DATA_MAX_SIZE, "PROGRESS CODE: V%x I%x\n\r", Value, Instance);
+ CharCount = AsciiSPrint (
+ Buffer,
+ EFI_STATUS_CODE_DATA_MAX_SIZE,
+ "PROGRESS CODE: V%x I%x\n\r",
+ Value,
+ Instance
+ );
} else {
- CharCount = AsciiSPrint (Buffer, EFI_STATUS_CODE_DATA_MAX_SIZE, "Undefined: C%x:V%x I%x\n\r", CodeType, Value, Instance);
+ CharCount = AsciiSPrint (
+ Buffer,
+ EFI_STATUS_CODE_DATA_MAX_SIZE,
+ "Undefined: C%x:V%x I%x\n\r",
+ CodeType,
+ Value,
+ Instance
+ );
}
//