SecurityPkg/SecureBootConfigDxe: Fix coding style issue
authorchenc2 <chen.a.chen@intel.com>
Tue, 17 Oct 2017 07:14:17 +0000 (15:14 +0800)
committerZhang, Chao B <chao.b.zhang@intel.com>
Tue, 17 Oct 2017 08:47:45 +0000 (16:47 +0800)
The change doesn't impact the functionality.

Cc: Bi Dandan <dandan.bi@intel.com>
Cc: Zhang Chao <chao.b.zhang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: chenc2 <chen.a.chen@intel.com>
Reviewed-by: Bi Dandan <dandan.bi@intel.com>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.c
SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.h

index 3e03be9738af01caf2c017c4031d44eaa975b30d..161512a1f47aafaeb31e83b7f49ae7b9c6a1105b 100644 (file)
@@ -3098,11 +3098,11 @@ DeleteSignatureEx (
     goto ON_EXIT;\r
   }\r
 \r
-  if (PrivateData->VariableName == VARIABLE_DB) {\r
+  if (PrivateData->VariableName == Variable_DB) {\r
     UnicodeSPrint (VariableName, 100, EFI_IMAGE_SECURITY_DATABASE);\r
-  } else if (PrivateData->VariableName == VARIABLE_DBX) {\r
+  } else if (PrivateData->VariableName == Variable_DBX) {\r
     UnicodeSPrint (VariableName, 100, EFI_IMAGE_SECURITY_DATABASE1);\r
-  } else if (PrivateData->VariableName == VARIABLE_DBT) {\r
+  } else if (PrivateData->VariableName == Variable_DBT) {\r
     UnicodeSPrint (VariableName, 100, EFI_IMAGE_SECURITY_DATABASE2);\r
   } else {\r
     goto ON_EXIT;\r
@@ -3149,7 +3149,7 @@ DeleteSignatureEx (
 \r
   RemainingSize = VariableDataSize;\r
   ListWalker = (EFI_SIGNATURE_LIST *)(VariableData);\r
-  if (DelType == DELETE_SIGNATURE_LIST_ALL) {\r
+  if (DelType == Delete_Signature_List_All) {\r
     VariableDataSize = 0;\r
   } else {\r
     while ((RemainingSize > 0) && (RemainingSize >= ListWalker->SignatureListSize) && ListIndex < PrivateData->ListIndex) {\r
@@ -3161,7 +3161,7 @@ DeleteSignatureEx (
       ListIndex++;\r
     }\r
 \r
-    if (CheckedCount == SIGNATURE_DATA_COUNTS (ListWalker) || DelType == DELETE_SIGNATURE_LIST_ONE) {\r
+    if (CheckedCount == SIGNATURE_DATA_COUNTS (ListWalker) || DelType == Delete_Signature_List_One) {\r
       RemainingSize -= ListWalker->SignatureListSize;\r
       ListWalker = (EFI_SIGNATURE_LIST *)((UINT8 *)ListWalker + ListWalker->SignatureListSize);\r
     } else {\r
@@ -3681,13 +3681,13 @@ LoadSignatureList (
     goto ON_EXIT;\r
   }\r
 \r
-  if (PrivateData->VariableName == VARIABLE_DB) {\r
+  if (PrivateData->VariableName == Variable_DB) {\r
     UnicodeSPrint (VariableName, 100, EFI_IMAGE_SECURITY_DATABASE);\r
     DstFormId = FORMID_SECURE_BOOT_DB_OPTION_FORM;\r
-  } else if (PrivateData->VariableName == VARIABLE_DBX) {\r
+  } else if (PrivateData->VariableName == Variable_DBX) {\r
     UnicodeSPrint (VariableName, 100, EFI_IMAGE_SECURITY_DATABASE1);\r
     DstFormId = FORMID_SECURE_BOOT_DBX_OPTION_FORM;\r
-  } else if (PrivateData->VariableName == VARIABLE_DBT) {\r
+  } else if (PrivateData->VariableName == Variable_DBT) {\r
     UnicodeSPrint (VariableName, 100, EFI_IMAGE_SECURITY_DATABASE2);\r
     DstFormId = FORMID_SECURE_BOOT_DBT_OPTION_FORM;\r
   } else {\r
@@ -4182,11 +4182,11 @@ LoadSignatureData (
     goto ON_EXIT;\r
   }\r
 \r
-  if (PrivateData->VariableName == VARIABLE_DB) {\r
+  if (PrivateData->VariableName == Variable_DB) {\r
     UnicodeSPrint (VariableName, 100, EFI_IMAGE_SECURITY_DATABASE);\r
-  } else if (PrivateData->VariableName == VARIABLE_DBX) {\r
+  } else if (PrivateData->VariableName == Variable_DBX) {\r
     UnicodeSPrint (VariableName, 100, EFI_IMAGE_SECURITY_DATABASE1);\r
-  } else if (PrivateData->VariableName == VARIABLE_DBT) {\r
+  } else if (PrivateData->VariableName == Variable_DBT) {\r
     UnicodeSPrint (VariableName, 100, EFI_IMAGE_SECURITY_DATABASE2);\r
   } else {\r
     goto ON_EXIT;\r
@@ -4584,7 +4584,7 @@ SecureBootCallback (
     // From DBX option to the level-1 form, display signature list.\r
     //\r
     case KEY_VALUE_FROM_DBX_TO_LIST_FORM:\r
-      Private->VariableName = VARIABLE_DBX;\r
+      Private->VariableName = Variable_DBX;\r
       LoadSignatureList (\r
         Private,\r
         LABEL_SIGNATURE_LIST_START,\r
@@ -4606,7 +4606,7 @@ SecureBootCallback (
       );\r
 \r
       if (Key.UnicodeChar == L'Y' || Key.UnicodeChar == L'y') {\r
-        DeleteSignatureEx (Private, DELETE_SIGNATURE_LIST_ALL, IfrNvData->CheckedDataCount);\r
+        DeleteSignatureEx (Private, Delete_Signature_List_All, IfrNvData->CheckedDataCount);\r
       }\r
 \r
       LoadSignatureList (\r
@@ -4630,7 +4630,7 @@ SecureBootCallback (
       );\r
 \r
       if (Key.UnicodeChar == L'Y' || Key.UnicodeChar == L'y') {\r
-        DeleteSignatureEx (Private, DELETE_SIGNATURE_LIST_ONE, IfrNvData->CheckedDataCount);\r
+        DeleteSignatureEx (Private, Delete_Signature_List_One, IfrNvData->CheckedDataCount);\r
       }\r
 \r
       LoadSignatureList (\r
@@ -4654,7 +4654,7 @@ SecureBootCallback (
       );\r
 \r
       if (Key.UnicodeChar == L'Y' || Key.UnicodeChar == L'y') {\r
-        DeleteSignatureEx (Private, DELETE_SIGNATURE_DATA, IfrNvData->CheckedDataCount);\r
+        DeleteSignatureEx (Private, Delete_Signature_Data, IfrNvData->CheckedDataCount);\r
       }\r
 \r
       LoadSignatureList (\r
index 52ad91b002f23fd3c59ee1c647b5d65baed5a3e4..e8ae992dd21762df6454a7bd90002241ac8c2e63 100644 (file)
@@ -152,16 +152,16 @@ typedef struct {
 } HII_VENDOR_DEVICE_PATH;\r
 \r
 typedef enum {\r
-  VARIABLE_DB,\r
-  VARIABLE_DBX,\r
-  VARIABLE_DBT,\r
-  VARIABLE_MAX\r
+  Variable_DB,\r
+  Variable_DBX,\r
+  Variable_DBT,\r
+  Variable_MAX\r
 } CURRENT_VARIABLE_NAME;\r
 \r
 typedef enum {\r
-  DELETE_SIGNATURE_LIST_ALL,\r
-  DELETE_SIGNATURE_LIST_ONE,\r
-  DELETE_SIGNATURE_DATA\r
+  Delete_Signature_List_All,\r
+  Delete_Signature_List_One,\r
+  Delete_Signature_Data\r
 }SIGNATURE_DELETE_TYPE;\r
 \r
 typedef struct {\r