Index: trunk/src/VBox/ValidationKit/utils/audio/vkat.cpp
===================================================================
--- trunk/src/VBox/ValidationKit/utils/audio/vkat.cpp	(revision 89641)
+++ trunk/src/VBox/ValidationKit/utils/audio/vkat.cpp	(revision 89642)
@@ -734,4 +734,15 @@
 
 
+const VKATCMD g_CmdTest =
+{
+    "test",
+    audioTestMain,
+    "Runs audio tests and creates an audio test set.",
+    g_aCmdTestOptions,
+    RT_ELEMENTS(g_aCmdTestOptions),
+    audioTestCmdTestHelp
+};
+
+
 /*********************************************************************************************************************************
 *   Command: verify                                                                                                              *
@@ -895,4 +906,15 @@
 
 
+const VKATCMD g_CmdVerify =
+{
+    "verify",
+    audioVerifyMain,
+    "Verifies a formerly created audio test set.",
+    g_aCmdVerifyOptions,
+    RT_ELEMENTS(g_aCmdVerifyOptions),
+    NULL,
+};
+
+
 /*********************************************************************************************************************************
 *   Main                                                                                                                         *
@@ -914,20 +936,15 @@
 }
 
-const VKATCMD g_aCommands[] =
-{
-    {
-        "test",     audioTestMain,
-        "Runs audio tests and creates an audio test set.",
-        g_aCmdTestOptions,      RT_ELEMENTS(g_aCmdTestOptions),     audioTestCmdTestHelp
-    },
-    {
-        "verify",   audioVerifyMain,
-        "Verifies a formerly created audio test set.",
-        g_aCmdVerifyOptions,    RT_ELEMENTS(g_aCmdVerifyOptions),   NULL,
-    },
-    g_cmdEnum,
-    g_cmdPlay,
-    g_cmdRec,
-    g_cmdSelfTest
+/**
+ * Commands.
+ */
+const VKATCMD *g_apCommands[] =
+{
+    &g_CmdTest,
+    &g_CmdVerify,
+    &g_CmdEnum,
+    &g_CmdPlay,
+    &g_CmdRec,
+    &g_CmdSelfTest
 };
 
@@ -956,6 +973,7 @@
                  );
 
-    for (uintptr_t iCmd = 0; iCmd < RT_ELEMENTS(g_aCommands); iCmd++)
-    {
+    for (uintptr_t iCmd = 0; iCmd < RT_ELEMENTS(g_apCommands); iCmd++)
+    {
+        PCVKATCMD const pCmd = g_apCommands[iCmd];
         RTStrmPrintf(pStrm,
                      "\n"
@@ -963,7 +981,7 @@
                      "    %s\n"
                      "Options for '%s':\n",
-                     g_aCommands[iCmd].pszCommand, g_aCommands[iCmd].pszDesc, g_aCommands[iCmd].pszCommand);
-        PCRTGETOPTDEF const paOptions = g_aCommands[iCmd].paOptions;
-        for (unsigned i = 0; i < g_aCommands[iCmd].cOptions; i++)
+                     pCmd->pszCommand, pCmd->pszDesc, pCmd->pszCommand);
+        PCRTGETOPTDEF const paOptions = pCmd->paOptions;
+        for (unsigned i = 0; i < pCmd->cOptions; i++)
         {
             if (RT_C_IS_PRINT(paOptions[i].iShort))
@@ -973,6 +991,6 @@
 
             const char *pszHelp = NULL;
-            if (g_aCommands[iCmd].pfnOptionHelp)
-                pszHelp = g_aCommands[iCmd].pfnOptionHelp(&paOptions[i]);
+            if (pCmd->pfnOptionHelp)
+                pszHelp = pCmd->pfnOptionHelp(&paOptions[i]);
             if (pszHelp)
                 RTStrmPrintf(pStrm, "    %s\n", pszHelp);
@@ -1075,8 +1093,10 @@
             case VINF_GETOPT_NOT_OPTION:
             {
-                for (uintptr_t i = 0; i < RT_ELEMENTS(g_aCommands); i++)
-                    if (strcmp(ValueUnion.psz, g_aCommands[i].pszCommand) == 0)
+                for (uintptr_t iCmd = 0; iCmd < RT_ELEMENTS(g_apCommands); iCmd++)
+                {
+                    PCVKATCMD const pCmd = g_apCommands[iCmd];
+                    if (strcmp(ValueUnion.psz, pCmd->pszCommand) == 0)
                     {
-                        size_t const cCombinedOptions  = g_aCommands[i].cOptions + RT_ELEMENTS(g_aCmdCommonOptions);
+                        size_t const cCombinedOptions  = pCmd->cOptions + RT_ELEMENTS(g_aCmdCommonOptions);
                         PRTGETOPTDEF paCombinedOptions = (PRTGETOPTDEF)RTMemAlloc(cCombinedOptions * sizeof(RTGETOPTDEF));
                         if (paCombinedOptions)
@@ -1084,5 +1104,5 @@
                             memcpy(paCombinedOptions, g_aCmdCommonOptions, sizeof(g_aCmdCommonOptions));
                             memcpy(&paCombinedOptions[RT_ELEMENTS(g_aCmdCommonOptions)],
-                                   g_aCommands[i].paOptions, g_aCommands[i].cOptions * sizeof(RTGETOPTDEF));
+                                   pCmd->paOptions, pCmd->cOptions * sizeof(RTGETOPTDEF));
 
                             rc = RTGetOptInit(&GetState, argc, argv, paCombinedOptions, cCombinedOptions,
@@ -1091,5 +1111,5 @@
                             {
 
-                                rcExit = g_aCommands[i].pfnHandler(&GetState);
+                                rcExit = pCmd->pfnHandler(&GetState);
                                 RTMemFree(paCombinedOptions);
                                 return rcExit;
@@ -1099,4 +1119,5 @@
                         return RTMsgErrorExitFailure("Out of memory!");
                     }
+                }
                 RTMsgError("Unknown command '%s'!\n", ValueUnion.psz);
                 audioTestUsage(g_pStdErr);
