From cd0842dc8293395c8ffb2dd6d2ffed4b28fcc8c6 Mon Sep 17 00:00:00 2001 From: ydong10 Date: Tue, 7 Aug 2012 00:44:28 +0000 Subject: [PATCH] Refine code to follow coding style. Signed-off-by: Eric Dong Reviewed-by: Jaben Carsey git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13595 6f19259b-4bc3-4df7-8a09-765794883524 --- .../UefiShellDebug1CommandsLib/DmpStore.c | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c index 655e72a876..be3d6f6472 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c @@ -19,6 +19,14 @@ #define INIT_DATA_BUFFER_SIZE 1024 #define INIT_ATTS_BUFFER_SIZE 64 +/** + Base on the input attribute value to return the attribute string. + + @param[in] Atts The input attribute value + @param[in,out] RetString The buffer to save the attribute string. + + @retval The attribute string info. +**/ CONST CHAR16 * EFIAPI GetAttrType ( @@ -28,21 +36,21 @@ GetAttrType ( { StrCpy(RetString, L""); - if (Atts & EFI_VARIABLE_NON_VOLATILE) { + if ((Atts & EFI_VARIABLE_NON_VOLATILE) != 0) { StrCat(RetString, L"+NV"); } - if (Atts & EFI_VARIABLE_RUNTIME_ACCESS) { + if ((Atts & EFI_VARIABLE_RUNTIME_ACCESS) != 0) { StrCat(RetString, L"+RS+BS"); - } else if (Atts & EFI_VARIABLE_BOOTSERVICE_ACCESS) { + } else if ((Atts & EFI_VARIABLE_BOOTSERVICE_ACCESS) != 0) { StrCat(RetString, L"+BS"); } - if (Atts & EFI_VARIABLE_HARDWARE_ERROR_RECORD) { + if ((Atts & EFI_VARIABLE_HARDWARE_ERROR_RECORD) != 0) { StrCat(RetString, L"+HR"); } - if (Atts & EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS) { + if ((Atts & EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS) != 0) { StrCat(RetString, L"+AW"); } - if (Atts & EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS) { + if ((Atts & EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS) != 0) { StrCat(RetString, L"+AT"); } -- 2.39.2