Index: /trunk/src/VBox/Main/ApplianceImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/ApplianceImpl.cpp	(revision 22486)
+++ /trunk/src/VBox/Main/ApplianceImpl.cpp	(revision 22487)
@@ -989,5 +989,5 @@
          * disk images in */
         vrc = RTDirCreateTemp(pszTmpDir);
-        if (RT_FAILURE(rc))
+        if (RT_FAILURE(vrc))
             throw setError(VBOX_E_FILE_ERROR,
                            tr("Cannot create temporary directory '%s'"), pszTmpDir);
@@ -1860,5 +1860,5 @@
          * in */
         vrc = RTDirCreateTemp(pszTmpDir);
-        if (RT_FAILURE(rc))
+        if (RT_FAILURE(vrc))
             throw setError(VBOX_E_FILE_ERROR,
                            tr("Cannot create temporary directory '%s'"), pszTmpDir);
@@ -2970,5 +2970,5 @@
          * disk images in */
         vrc = RTDirCreateTemp(pszTmpDir);
-        if (RT_FAILURE(rc))
+        if (RT_FAILURE(vrc))
             throw setError(VBOX_E_FILE_ERROR,
                            tr("Cannot create temporary directory '%s'"), pszTmpDir);
Index: /trunk/src/VBox/Main/ConsoleImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/ConsoleImpl.cpp	(revision 22486)
+++ /trunk/src/VBox/Main/ConsoleImpl.cpp	(revision 22487)
@@ -7329,9 +7329,8 @@
         do
         {
-            LogFlowFunc (("Reattaching new differencing hard disks...\n"));
+            LogFlowFunc(("Reattaching new differencing hard disks...\n"));
 
             com::SafeIfaceArray<IHardDiskAttachment> atts;
-            rc = that->mMachine->
-                COMGETTER(HardDiskAttachments) (ComSafeArrayAsOutParam (atts));
+            rc = that->mMachine->COMGETTER(HardDiskAttachments)(ComSafeArrayAsOutParam(atts));
             if (FAILED (rc))
                 break;
@@ -7350,9 +7349,9 @@
                  */
                 rc = atts[i]->COMGETTER(Controller)(&controllerName);
-                if (FAILED (rc))
+                if (FAILED(rc))
                     break;
 
                 rc = that->mMachine->GetStorageControllerByName(controllerName, controller.asOutParam());
-                if (FAILED (rc))
+                if (FAILED(rc))
                     break;
 
@@ -7363,18 +7362,17 @@
                  *  to access Console.
                  */
-                int vrc = VMR3ReqCall (that->mpVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT,
-                                       (PFNRT)reconfigureHardDisks, 5, that->mpVM, lInstance,
-                                       enmController, atts [i], &rc);
-                if (VBOX_SUCCESS (rc))
-                    rc = pReq->iStatus;
-                VMR3ReqFree (pReq);
-                if (FAILED (rc))
-                    break;
-                if (VBOX_FAILURE (vrc))
+                int vrc = VMR3ReqCall(that->mpVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT,
+                                      (PFNRT)reconfigureHardDisks, 5, that->mpVM, lInstance, enmController, atts[i], &rc);
+                if (RT_SUCCESS(vrc))
+                    vrc = pReq->iStatus;
+                VMR3ReqFree(pReq);
+                if (RT_FAILURE(vrc))
                 {
-                    errMsg = Utf8StrFmt (Console::tr ("%Rrc"), vrc);
+                    errMsg = Utf8StrFmt(Console::tr("%Rrc"), vrc);
                     rc = E_FAIL;
                     break;
                 }
+                if (FAILED(rc))
+                    break;
             }
         }
Index: /trunk/src/VBox/Main/MachineImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/MachineImpl.cpp	(revision 22486)
+++ /trunk/src/VBox/Main/MachineImpl.cpp	(revision 22487)
@@ -5929,5 +5929,5 @@
         ULONG portCount;
         rc = pCtl->COMGETTER(PortCount)(&portCount);
-        ComAssertRCRet(rc, rc);
+        ComAssertComRCRet(rc, rc);
         ctl.ulPortCount = portCount;
 
@@ -5940,10 +5940,10 @@
                  || (FAILED(rc = pCtl->GetIDEEmulationPort(3, (LONG*)&ctl.lIDE1SlaveEmulationPort)))
                )
-                ComAssertRCRet(rc, rc);
+                ComAssertComRCRet(rc, rc);
         }
 
         /* save the devices now. */
         rc = saveStorageDevices(pCtl, ctl);
-        ComAssertRCRet(rc, rc);
+        ComAssertComRCRet(rc, rc);
 
         data.llStorageControllers.push_back(ctl);
