]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/BdsDxe/BootMaint/BBSsupport.c
Update the code to following EDK coding style document.
[mirror_edk2.git] / MdeModulePkg / Universal / BdsDxe / BootMaint / BBSsupport.c
index ab3b24b2bd40af0d1b7336d5436db050158fdc19..24c934200836a80195c2a574eadff46698e6034a 100644 (file)
@@ -92,7 +92,7 @@ UnicodeToAscii (
 }\r
 \r
 /**\r
-  EDES_TODO: Add function description\r
+  EDES_TODO: Add function description.\r
 \r
   @param CurBBSEntry     EDES_TODO: Add parameter description\r
   @param Index           EDES_TODO: Add parameter description\r
@@ -393,7 +393,7 @@ BdsCreateLegacyBootOption (
 }\r
 \r
 /**\r
-  EDES_TODO: Add function description\r
+  EDES_TODO: Add function description.\r
 \r
   @param BootOptionVar   EDES_TODO: Add parameter description\r
   @param BbsEntry        EDES_TODO: Add parameter description\r
@@ -435,7 +435,7 @@ BdsIsLegacyBootOption (
 }\r
 \r
 /**\r
-  EDES_TODO: Add function description\r
+  EDES_TODO: Add function description.\r
 \r
   @param OptionNumber    EDES_TODO: Add parameter description\r
   @param BootOrder       EDES_TODO: Add parameter description\r
@@ -606,7 +606,7 @@ BdsDeleteAllInvalidLegacyBootOptions (
       );\r
   }\r
 \r
-  if (BootOrderSize) {\r
+  if (BootOrderSize != 0) {\r
     Status = gRT->SetVariable (\r
                     L"BootOrder",\r
                     &gEfiGlobalVariableGuid,\r
@@ -624,7 +624,7 @@ BdsDeleteAllInvalidLegacyBootOptions (
 }\r
 \r
 /**\r
-  EDES_TODO: Add function description\r
+  EDES_TODO: Add function description.\r
 \r
   @param BootOrder       EDES_TODO: Add parameter description\r
   @param BootOptionNum   EDES_TODO: Add parameter description\r
@@ -694,7 +694,7 @@ BdsFindLegacyBootOptionByDevType (
 }\r
 \r
 /**\r
-  EDES_TODO: Add function description\r
+  EDES_TODO: Add function description.\r
 \r
   @param BbsItem         EDES_TODO: Add parameter description\r
   @param Index           EDES_TODO: Add parameter description\r
@@ -858,7 +858,7 @@ BdsAddNonExistingLegacyBootOptions (
 }\r
 \r
 /**\r
-  EDES_TODO: Add function description\r
+  EDES_TODO: Add function description.\r
 \r
   @param BbsTable        EDES_TODO: Add parameter description\r
   @param BbsType         EDES_TODO: Add parameter description\r
@@ -895,7 +895,7 @@ BdsFillDevOrderBuf (
 }\r
 \r
 /**\r
-  EDES_TODO: Add function description\r
+  EDES_TODO: Add function description.\r
 \r
   @param BbsTable        EDES_TODO: Add parameter description\r
   @param BbsCount        EDES_TODO: Add parameter description\r
@@ -980,7 +980,7 @@ BdsCreateDevOrder (
   Ptr += sizeof (BBS_TYPE);\r
   *((UINT16 *) Ptr) = (UINT16) (sizeof (UINT16) + FDCount * sizeof (UINT16));\r
   Ptr += sizeof (UINT16);\r
-  if (FDCount) {\r
+  if (FDCount != 0) {\r
     Ptr = (UINT8 *) BdsFillDevOrderBuf (BbsTable, BBS_FLOPPY, BbsCount, (UINT16 *) Ptr);\r
   }\r
 \r
@@ -988,7 +988,7 @@ BdsCreateDevOrder (
   Ptr += sizeof (BBS_TYPE);\r
   *((UINT16 *) Ptr) = (UINT16) (sizeof (UINT16) + HDCount * sizeof (UINT16));\r
   Ptr += sizeof (UINT16);\r
-  if (HDCount) {\r
+  if (HDCount != 0) {\r
     Ptr = (UINT8 *) BdsFillDevOrderBuf (BbsTable, BBS_HARDDISK, BbsCount, (UINT16 *) Ptr);\r
   }\r
 \r
@@ -996,7 +996,7 @@ BdsCreateDevOrder (
   Ptr += sizeof (BBS_TYPE);\r
   *((UINT16 *) Ptr) = (UINT16) (sizeof (UINT16) + CDCount * sizeof (UINT16));\r
   Ptr += sizeof (UINT16);\r
-  if (CDCount) {\r
+  if (CDCount != 0) {\r
     Ptr = (UINT8 *) BdsFillDevOrderBuf (BbsTable, BBS_CDROM, BbsCount, (UINT16 *) Ptr);\r
   }\r
 \r
@@ -1004,7 +1004,7 @@ BdsCreateDevOrder (
   Ptr += sizeof (BBS_TYPE);\r
   *((UINT16 *) Ptr) = (UINT16) (sizeof (UINT16) + NETCount * sizeof (UINT16));\r
   Ptr += sizeof (UINT16);\r
-  if (NETCount) {\r
+  if (NETCount != 0) {\r
     Ptr = (UINT8 *) BdsFillDevOrderBuf (BbsTable, BBS_EMBED_NETWORK, BbsCount, (UINT16 *) Ptr);\r
   }\r
 \r
@@ -1012,7 +1012,7 @@ BdsCreateDevOrder (
   Ptr += sizeof (BBS_TYPE);\r
   *((UINT16 *) Ptr) = (UINT16) (sizeof (UINT16) + BEVCount * sizeof (UINT16));\r
   Ptr += sizeof (UINT16);\r
-  if (BEVCount) {\r
+  if (BEVCount != 0) {\r
     Ptr = (UINT8 *) BdsFillDevOrderBuf (BbsTable, BBS_BEV_DEVICE, BbsCount, (UINT16 *) Ptr);\r
   }\r
 \r
@@ -1029,7 +1029,7 @@ BdsCreateDevOrder (
 }\r
 \r
 /**\r
-  EDES_TODO: Add function description\r
+  EDES_TODO: Add function description.\r
 \r
   @param VOID            EDES_TODO: Add parameter description\r
 \r
@@ -1334,7 +1334,7 @@ BdsUpdateLegacyDevOrder (
     // at this point we have copied those valid indexes to new buffer\r
     // and we should check if there is any new appeared boot device\r
     //\r
-    if (Idx) {\r
+    if (Idx != 0) {\r
       for (Index2 = 0; Index2 < *Idx; Index2++) {\r
         if ((NewDevPtr[Index2] & 0xFF) == (UINT16) Index) {\r
           break;\r
@@ -1353,7 +1353,7 @@ BdsUpdateLegacyDevOrder (
     }\r
   }\r
 \r
-  if (FDCount) {\r
+  if (FDCount != 0) {\r
     //\r
     // Just to make sure that disabled indexes are all at the end of the array\r
     //\r
@@ -1373,7 +1373,7 @@ BdsUpdateLegacyDevOrder (
     }\r
   }\r
 \r
-  if (HDCount) {\r
+  if (HDCount != 0) {\r
     //\r
     // Just to make sure that disabled indexes are all at the end of the array\r
     //\r
@@ -1393,7 +1393,7 @@ BdsUpdateLegacyDevOrder (
     }\r
   }\r
 \r
-  if (CDCount) {\r
+  if (CDCount != 0) {\r
     //\r
     // Just to make sure that disabled indexes are all at the end of the array\r
     //\r
@@ -1413,7 +1413,7 @@ BdsUpdateLegacyDevOrder (
     }\r
   }\r
 \r
-  if (NETCount) {\r
+  if (NETCount != 0) {\r
     //\r
     // Just to make sure that disabled indexes are all at the end of the array\r
     //\r
@@ -1433,7 +1433,7 @@ BdsUpdateLegacyDevOrder (
     }\r
   }\r
 \r
-  if (BEVCount) {\r
+  if (BEVCount!= 0) {\r
     //\r
     // Just to make sure that disabled indexes are all at the end of the array\r
     //\r
@@ -1468,7 +1468,7 @@ BdsUpdateLegacyDevOrder (
 }\r
 \r
 /**\r
-  EDES_TODO: Add function description\r
+  EDES_TODO: Add function description.\r
 \r
   @param DeviceType      EDES_TODO: Add parameter description\r
   @param LocalBbsTable   EDES_TODO: Add parameter description\r
@@ -1538,7 +1538,7 @@ BdsSetBootPriority4SameTypeDev (
 }\r
 \r
 /**\r
-  EDES_TODO: Add function description\r
+  EDES_TODO: Add function description.\r
 \r
   @param LocalBbsTable   EDES_TODO: Add parameter description\r
 \r
@@ -1586,7 +1586,7 @@ PrintBbsTable (
 }\r
 \r
 /**\r
-  EDES_TODO: Add function description\r
+  EDES_TODO: Add function description.\r
 \r
   @param Entry           EDES_TODO: Add parameter description\r
 \r
@@ -1671,7 +1671,7 @@ BdsRefreshBbsTableForBoot (
                           &gEfiGlobalVariableGuid,\r
                           &BootOrderSize\r
                           );\r
-  for (Index = 0; BootOrder && Index < BootOrderSize / sizeof (UINT16); Index++) {\r
+  for (Index = 0; ((BootOrder != NULL) && (Index < BootOrderSize / sizeof (UINT16))); Index++) {\r
     UnicodeSPrint (BootOption, sizeof (BootOption), L"Boot%04x", BootOrder[Index]);\r
     BootOptionVar = BdsLibGetVariableAndSize (\r
                       BootOption,\r
@@ -1714,7 +1714,7 @@ BdsRefreshBbsTableForBoot (
     }\r
   }\r
 \r
-  if (BootOrder) {\r
+  if (BootOrder != NULL) {\r
     SafeFreePool (BootOrder);\r
   }\r
   //\r