diff options
author | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-08-07 00:44:28 +0000 |
---|---|---|
committer | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-08-07 00:44:28 +0000 |
commit | cd0842dc8293395c8ffb2dd6d2ffed4b28fcc8c6 (patch) | |
tree | cab9488d6b8df2b093b354c81c798826fef16785 | |
parent | 33026ccf33d8295ea6475f79f34415243a7a2513 (diff) | |
download | edk2-platforms-cd0842dc8293395c8ffb2dd6d2ffed4b28fcc8c6.tar.xz |
Refine code to follow coding style.
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13595 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r-- | ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c | 20 |
1 files 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");
}
|