summaryrefslogtreecommitdiffstats
path: root/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiTableParser.c
diff options
context:
space:
mode:
authorDandan Bi <dandan.bi@intel.com>2018-06-05 09:20:05 +0800
committerEric Dong <eric.dong@intel.com>2018-06-11 16:10:22 +0800
commitf75c7478280b96d191e86856c0b1c49ff711c284 (patch)
treeb2f9c063d386e3006f5db0a272b6fc990c1d1344 /ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiTableParser.c
parenta6eaba4d7f23262ab8e8502b476bdf5249a54ad4 (diff)
downloadedk2-f75c7478280b96d191e86856c0b1c49ff711c284.tar.gz
edk2-f75c7478280b96d191e86856c0b1c49ff711c284.tar.bz2
edk2-f75c7478280b96d191e86856c0b1c49ff711c284.zip
ShellPkg/UefiShellAcpiViewCommandLib: Fix ECC issues
1. Separate variable definition and initialization. 2. Make the variable naming following Edk2 rule. V2: Remove the updates of guard macros in header files. Cc: Sami Mujawar <sami.mujawar@arm.com> Cc: Evan Lloyd <evan.lloyd@arm.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Diffstat (limited to 'ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiTableParser.c')
-rw-r--r--ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiTableParser.c50
1 files changed, 25 insertions, 25 deletions
diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiTableParser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiTableParser.c
index 7b1a02cad3..fff5757bf5 100644
--- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiTableParser.c
+++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiTableParser.c
@@ -45,32 +45,32 @@ RegisterParser (
IN PARSE_ACPI_TABLE_PROC ParserProc
)
{
- UINT32 index;
+ UINT32 Index;
if ((ParserProc == NULL) || (Signature == ACPI_PARSER_SIGNATURE_NULL)) {
return EFI_INVALID_PARAMETER;
}
// Search if a parser is already installed
- for (index = 0;
- index < (sizeof (mTableParserList) / sizeof (mTableParserList[0]));
- index++)
+ for (Index = 0;
+ Index < (sizeof (mTableParserList) / sizeof (mTableParserList[0]));
+ Index++)
{
- if (Signature == mTableParserList[index].Signature) {
- if (mTableParserList[index].Parser != NULL) {
+ if (Signature == mTableParserList[Index].Signature) {
+ if (mTableParserList[Index].Parser != NULL) {
return EFI_ALREADY_STARTED;
}
}
}
// Find the first free slot and register the parser
- for (index = 0;
- index < (sizeof (mTableParserList) / sizeof (mTableParserList[0]));
- index++)
+ for (Index = 0;
+ Index < (sizeof (mTableParserList) / sizeof (mTableParserList[0]));
+ Index++)
{
- if (mTableParserList[index].Signature == ACPI_PARSER_SIGNATURE_NULL) {
- mTableParserList[index].Signature = Signature;
- mTableParserList[index].Parser = ParserProc;
+ if (mTableParserList[Index].Signature == ACPI_PARSER_SIGNATURE_NULL) {
+ mTableParserList[Index].Signature = Signature;
+ mTableParserList[Index].Parser = ParserProc;
return EFI_SUCCESS;
}
}
@@ -96,19 +96,19 @@ DeregisterParser (
IN UINT32 Signature
)
{
- UINT32 index;
+ UINT32 Index;
if (Signature == ACPI_PARSER_SIGNATURE_NULL) {
return EFI_INVALID_PARAMETER;
}
- for (index = 0;
- index < (sizeof (mTableParserList) / sizeof (mTableParserList[0]));
- index++)
+ for (Index = 0;
+ Index < (sizeof (mTableParserList) / sizeof (mTableParserList[0]));
+ Index++)
{
- if (Signature == mTableParserList[index].Signature) {
- mTableParserList[index].Signature = ACPI_PARSER_SIGNATURE_NULL;
- mTableParserList[index].Parser = NULL;
+ if (Signature == mTableParserList[Index].Signature) {
+ mTableParserList[Index].Signature = ACPI_PARSER_SIGNATURE_NULL;
+ mTableParserList[Index].Parser = NULL;
return EFI_SUCCESS;
}
}
@@ -137,18 +137,18 @@ GetParser (
OUT PARSE_ACPI_TABLE_PROC * ParserProc
)
{
- UINT32 index;
+ UINT32 Index;
if ((ParserProc == NULL) || (Signature == ACPI_PARSER_SIGNATURE_NULL)) {
return EFI_INVALID_PARAMETER;
}
- for (index = 0;
- index < (sizeof (mTableParserList) / sizeof (mTableParserList[0]));
- index++)
+ for (Index = 0;
+ Index < (sizeof (mTableParserList) / sizeof (mTableParserList[0]));
+ Index++)
{
- if (Signature == mTableParserList[index].Signature) {
- *ParserProc = mTableParserList[index].Parser;
+ if (Signature == mTableParserList[Index].Signature) {
+ *ParserProc = mTableParserList[Index].Parser;
return EFI_SUCCESS;
}
}