Index: /trunk/src/VBox/Devices/Audio/testcase/tstAudioTestService.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/testcase/tstAudioTestService.cpp	(revision 90918)
+++ /trunk/src/VBox/Devices/Audio/testcase/tstAudioTestService.cpp	(revision 90919)
@@ -76,60 +76,56 @@
 
     ATSSERVER Srv;
-    rc = AudioTestSvcCreate(&Srv);
+
+    RTGETOPTUNION Val;
+    RT_ZERO(Val);
+
+    Val.psz = "server";
+    rc = AudioTestSvcHandleOption(&Srv, ATSTCPOPT_CONN_MODE, &Val);
+    RTTEST_CHECK_RC_OK(hTest, rc);
+
+    rc = AudioTestSvcInit(&Srv, &Callbacks);
     RTTEST_CHECK_RC_OK(hTest, rc);
     if (RT_SUCCESS(rc))
     {
-        RTGETOPTUNION Val;
-        RT_ZERO(Val);
+        uint16_t uPort = ATS_TCP_DEF_BIND_PORT_HOST;
 
-        Val.psz = "server";
-        rc = AudioTestSvcHandleOption(&Srv, ATSTCPOPT_CONN_MODE, &Val);
-        RTTEST_CHECK_RC_OK(hTest, rc);
+        for (unsigned i = 0; i < 64; i++)
+        {
+            Val.u16 = uPort;
+            rc = AudioTestSvcHandleOption(&Srv, ATSTCPOPT_BIND_PORT, &Val);
+            RTTEST_CHECK_RC_OK(hTest, rc);
 
-        rc = AudioTestSvcInit(&Srv, &Callbacks);
-        RTTEST_CHECK_RC_OK(hTest, rc);
+            rc = AudioTestSvcStart(&Srv);
+            if (RT_SUCCESS(rc))
+                break;
+
+            RTTestPrintf(hTest, RTTESTLVL_ALWAYS, "Port %RU32 already used\n", uPort);
+
+            /* Use a different port base in case VBox already is running
+             * with the same service using ATS_TCP_DEF_BIND_PORT_HOST. */
+            uPort = ATS_TCP_DEF_BIND_PORT_HOST + RTRandU32Ex(0, 4242);
+        }
+
         if (RT_SUCCESS(rc))
         {
-            uint16_t uPort = ATS_TCP_DEF_BIND_PORT_HOST;
+            RTTestPrintf(hTest, RTTESTLVL_ALWAYS, "Using port %RU32\n", uPort);
 
-            for (unsigned i = 0; i < 64; i++)
-            {
-                Val.u16 = uPort;
-                rc = AudioTestSvcHandleOption(&Srv, ATSTCPOPT_BIND_PORT, &Val);
-                RTTEST_CHECK_RC_OK(hTest, rc);
+            rc = AudioTestSvcClientCreate(&Client);
+            RTTEST_CHECK_RC_OK(hTest, rc);
 
-                rc = AudioTestSvcStart(&Srv);
-                if (RT_SUCCESS(rc))
-                    break;
+            Val.psz = "client";
+            rc = AudioTestSvcClientHandleOption(&Client, ATSTCPOPT_CONN_MODE, &Val);
+            RTTEST_CHECK_RC_OK(hTest, rc);
 
-                RTTestPrintf(hTest, RTTESTLVL_ALWAYS, "Port %RU32 already used\n", uPort);
+            Val.psz = ATS_TCP_DEF_CONNECT_HOST_ADDR_STR;
+            rc = AudioTestSvcClientHandleOption(&Client, ATSTCPOPT_CONNECT_ADDRESS, &Val);
+            RTTEST_CHECK_RC_OK(hTest, rc);
 
-                /* Use a different port base in case VBox already is running
-                 * with the same service using ATS_TCP_DEF_BIND_PORT_HOST. */
-                uPort = ATS_TCP_DEF_BIND_PORT_HOST + RTRandU32Ex(0, 4242);
-            }
+            Val.u16 = uPort;
+            rc = AudioTestSvcClientHandleOption(&Client, ATSTCPOPT_CONNECT_PORT, &Val);
+            RTTEST_CHECK_RC_OK(hTest, rc);
 
-            if (RT_SUCCESS(rc))
-            {
-                RTTestPrintf(hTest, RTTESTLVL_ALWAYS, "Using port %RU32\n", uPort);
-
-                rc = AudioTestSvcClientCreate(&Client);
-                RTTEST_CHECK_RC_OK(hTest, rc);
-
-                Val.psz = "client";
-                rc = AudioTestSvcClientHandleOption(&Client, ATSTCPOPT_CONN_MODE, &Val);
-                RTTEST_CHECK_RC_OK(hTest, rc);
-
-                Val.psz = ATS_TCP_DEF_CONNECT_HOST_ADDR_STR;
-                rc = AudioTestSvcClientHandleOption(&Client, ATSTCPOPT_CONNECT_ADDRESS, &Val);
-                RTTEST_CHECK_RC_OK(hTest, rc);
-
-                Val.u16 = uPort;
-                rc = AudioTestSvcClientHandleOption(&Client, ATSTCPOPT_CONNECT_PORT, &Val);
-                RTTEST_CHECK_RC_OK(hTest, rc);
-
-                rc = AudioTestSvcClientConnect(&Client);
-                RTTEST_CHECK_RC_OK(hTest, rc);
-            }
+            rc = AudioTestSvcClientConnect(&Client);
+            RTTEST_CHECK_RC_OK(hTest, rc);
         }
     }
