From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.115; helo=mga14.intel.com; envelope-from=chen.a.chen@intel.com; receiver=edk2-devel@lists.01.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id B8C2A20945BD7 for ; Mon, 9 Oct 2017 19:05:16 -0700 (PDT) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Oct 2017 19:08:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,502,1500966000"; d="scan'208";a="321392524" Received: from chenche4.ccr.corp.intel.com ([10.239.158.36]) by fmsmga004.fm.intel.com with ESMTP; 09 Oct 2017 19:08:42 -0700 From: chenc2 To: edk2-devel@lists.01.org Cc: chenc2 , Bi Dandan , Zhang Chao Date: Tue, 10 Oct 2017 10:08:41 +0800 Message-Id: <20171010020841.19452-1-chen.a.chen@intel.com> X-Mailer: git-send-email 2.13.2.windows.1 Subject: [PATCH] SecurityPkg/SecureBootConfigImpl.c: Fix coding style issue. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Oct 2017 02:05:17 -0000 Fix coding style issue. Cc: Bi Dandan Cc: Zhang Chao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: chenc2 --- .../SecureBootConfigDxe/SecureBootConfigImpl.c | 30 +++++++++++----------- .../SecureBootConfigDxe/SecureBootConfigImpl.h | 14 +++++----- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.c b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.c index 457e020ece..3e5012e21b 100644 --- a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.c +++ b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.c @@ -3098,11 +3098,11 @@ DeleteSignatureEx ( goto ON_EXIT; } - if (PrivateData->VariableName == VARIABLE_DB) { + if (PrivateData->VariableName == Variable_DB) { UnicodeSPrint (VariableName, 100, EFI_IMAGE_SECURITY_DATABASE); - } else if (PrivateData->VariableName == VARIABLE_DBX) { + } else if (PrivateData->VariableName == Variable_DBX) { UnicodeSPrint (VariableName, 100, EFI_IMAGE_SECURITY_DATABASE1); - } else if (PrivateData->VariableName == VARIABLE_DBT) { + } else if (PrivateData->VariableName == Variable_DBT) { UnicodeSPrint (VariableName, 100, EFI_IMAGE_SECURITY_DATABASE2); } else { goto ON_EXIT; @@ -3149,7 +3149,7 @@ DeleteSignatureEx ( RemainingSize = VariableDataSize; ListWalker = (EFI_SIGNATURE_LIST *)(VariableData); - if (DelType == DELETE_SIGNATURE_LIST_ALL) { + if (DelType == Delete_Signature_List_All) { VariableDataSize = 0; } else { while ((RemainingSize > 0) && (RemainingSize >= ListWalker->SignatureListSize) && ListIndex < PrivateData->ListIndex) { @@ -3161,7 +3161,7 @@ DeleteSignatureEx ( ListIndex++; } - if (CheckedCount == SIGNATURE_DATA_COUNTS (ListWalker) || DelType == DELETE_SIGNATURE_LIST_ONE) { + if (CheckedCount == SIGNATURE_DATA_COUNTS (ListWalker) || DelType == Delete_Signature_List_One) { RemainingSize -= ListWalker->SignatureListSize; ListWalker = (EFI_SIGNATURE_LIST *)((UINT8 *)ListWalker + ListWalker->SignatureListSize); } else { @@ -3685,13 +3685,13 @@ LoadSignatureList ( goto ON_EXIT; } - if (PrivateData->VariableName == VARIABLE_DB) { + if (PrivateData->VariableName == Variable_DB) { UnicodeSPrint (VariableName, 100, EFI_IMAGE_SECURITY_DATABASE); DstFormId = FORMID_SECURE_BOOT_DB_OPTION_FORM; - } else if (PrivateData->VariableName == VARIABLE_DBX) { + } else if (PrivateData->VariableName == Variable_DBX) { UnicodeSPrint (VariableName, 100, EFI_IMAGE_SECURITY_DATABASE1); DstFormId = FORMID_SECURE_BOOT_DBX_OPTION_FORM; - } else if (PrivateData->VariableName == VARIABLE_DBT) { + } else if (PrivateData->VariableName == Variable_DBT) { UnicodeSPrint (VariableName, 100, EFI_IMAGE_SECURITY_DATABASE2); DstFormId = FORMID_SECURE_BOOT_DBT_OPTION_FORM; } else { @@ -4216,11 +4216,11 @@ LoadSignatureData ( goto ON_EXIT; } - if (PrivateData->VariableName == VARIABLE_DB) { + if (PrivateData->VariableName == Variable_DB) { UnicodeSPrint (VariableName, 100, EFI_IMAGE_SECURITY_DATABASE); - } else if (PrivateData->VariableName == VARIABLE_DBX) { + } else if (PrivateData->VariableName == Variable_DBX) { UnicodeSPrint (VariableName, 100, EFI_IMAGE_SECURITY_DATABASE1); - } else if (PrivateData->VariableName == VARIABLE_DBT) { + } else if (PrivateData->VariableName == Variable_DBT) { UnicodeSPrint (VariableName, 100, EFI_IMAGE_SECURITY_DATABASE2); } else { goto ON_EXIT; @@ -4618,7 +4618,7 @@ SecureBootCallback ( // From DBX option to the level-1 form, display signature list. // case KEY_VALUE_FROM_DBX_TO_LIST_FORM: - Private->VariableName = VARIABLE_DBX; + Private->VariableName = Variable_DBX; LoadSignatureList ( Private, LABEL_SIGNATURE_LIST_START, @@ -4640,7 +4640,7 @@ SecureBootCallback ( ); if (Key.UnicodeChar == L'Y' || Key.UnicodeChar == L'y') { - DeleteSignatureEx (Private, DELETE_SIGNATURE_LIST_ALL, IfrNvData->CheckedDataCount); + DeleteSignatureEx (Private, Delete_Signature_List_All, IfrNvData->CheckedDataCount); } LoadSignatureList ( @@ -4664,7 +4664,7 @@ SecureBootCallback ( ); if (Key.UnicodeChar == L'Y' || Key.UnicodeChar == L'y') { - DeleteSignatureEx (Private, DELETE_SIGNATURE_LIST_ONE, IfrNvData->CheckedDataCount); + DeleteSignatureEx (Private, Delete_Signature_List_One, IfrNvData->CheckedDataCount); } LoadSignatureList ( @@ -4688,7 +4688,7 @@ SecureBootCallback ( ); if (Key.UnicodeChar == L'Y' || Key.UnicodeChar == L'y') { - DeleteSignatureEx (Private, DELETE_SIGNATURE_DATA, IfrNvData->CheckedDataCount); + DeleteSignatureEx (Private, Delete_Signature_Data, IfrNvData->CheckedDataCount); } LoadSignatureList ( diff --git a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.h b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.h index 52ad91b002..e8ae992dd2 100644 --- a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.h +++ b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.h @@ -152,16 +152,16 @@ typedef struct { } HII_VENDOR_DEVICE_PATH; typedef enum { - VARIABLE_DB, - VARIABLE_DBX, - VARIABLE_DBT, - VARIABLE_MAX + Variable_DB, + Variable_DBX, + Variable_DBT, + Variable_MAX } CURRENT_VARIABLE_NAME; typedef enum { - DELETE_SIGNATURE_LIST_ALL, - DELETE_SIGNATURE_LIST_ONE, - DELETE_SIGNATURE_DATA + Delete_Signature_List_All, + Delete_Signature_List_One, + Delete_Signature_Data }SIGNATURE_DELETE_TYPE; typedef struct { -- 2.13.2.windows.1