]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Application/ShellSortTestApp/ShellSortTestApp.c
Refine code to follow coding style.
[mirror_edk2.git] / ShellPkg / Application / ShellSortTestApp / ShellSortTestApp.c
index 91817ee291c9d209a898b637c0f1bbd4de1010d2..6bdd237e8dae02b6812c96e0abda2e203bc91393 100644 (file)
 #include <Library/ShellCEntryLib.h>\r
 #include <Library/SortLib.h>\r
 \r
+/**\r
+  Test comparator.\r
+\r
+  @param[in] b1   The first INTN\r
+  @param[in] b2   The other INTN\r
+\r
+  @retval 0       They are the same.\r
+  @retval -1      b1 is less than b2\r
+  @retval 1       b1 is greater then b2\r
+**/\r
 INTN\r
 EFIAPI\r
-Test(CONST VOID*b1, CONST VOID*b2)\r
+Test(CONST VOID *b1, CONST VOID *b2)\r
 {\r
   if (*(INTN*)b1 == *(INTN*)b2) {\r
     return (0);\r
@@ -38,8 +48,8 @@ Test(CONST VOID*b1, CONST VOID*b2)
   The ShellCEntryLib library instance wrappers the actual UEFI application\r
   entry point and calls this ShellAppMain function.\r
 \r
-  @param  ImageHandle  The image handle of the UEFI Application.\r
-  @param  SystemTable  A pointer to the EFI System Table.\r
+  @param  Argc             Argument count\r
+  @param  Argv             The parsed arguments\r
 \r
   @retval  0               The application exited normally.\r
   @retval  Other           An error occurred.\r
@@ -52,7 +62,19 @@ ShellAppMain (
   IN CHAR16 **Argv\r
   )\r
 {\r
-  INTN Array[10] = {2,3,4,1,5,6,7,8,1,5};\r
+  INTN Array[10];\r
+\r
+  Array[0] = 2;\r
+  Array[1] = 3;\r
+  Array[2] = 4;\r
+  Array[3] = 1;\r
+  Array[4] = 5;\r
+  Array[5] = 6;\r
+  Array[6] = 7;\r
+  Array[7] = 8;\r
+  Array[8] = 1;\r
+  Array[9] = 5;\r
+\r
   Print(L"Array = %d, %d, %d, %d, %d, %d, %d, %d, %d, %d\r\n", Array[0],Array[1],Array[2],Array[3],Array[4],Array[5],Array[6],Array[7],Array[8],Array[9]);\r
   PerformQuickSort(Array, 10, sizeof(INTN), Test);\r
   Print(L"POST-SORT\r\n");\r