Index: /trunk/src/VBox/Main/src-server/HostUpdateImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/HostUpdateImpl.cpp	(revision 85875)
+++ /trunk/src/VBox/Main/src-server/HostUpdateImpl.cpp	(revision 85876)
@@ -257,6 +257,4 @@
 HRESULT HostUpdate::i_checkForVBoxUpdate()
 {
-    HRESULT rc;
-
     // Default to no update required
     m_updateNeeded = FALSE;
@@ -266,7 +264,6 @@
     Utf8Str strUrl("https://update.virtualbox.org/query.php/?");
     Bstr platform;
-    rc = mVirtualBox->COMGETTER(PackageType)(platform.asOutParam());
-    if (FAILED(rc))
-        return setErrorVrc(rc, tr("%s: IVirtualBox::packageType() failed: %Rrc"), __FUNCTION__, rc);
+    HRESULT rc = mVirtualBox->COMGETTER(PackageType)(platform.asOutParam());
+    AssertComRCReturn(rc, rc);
     strUrl.appendPrintf("platform=%ls", platform.raw()); // e.g. SOLARIS_64BITS_GENERIC
 
@@ -274,13 +271,11 @@
     Bstr versionNormalized;
     rc = mVirtualBox->COMGETTER(VersionNormalized)(versionNormalized.asOutParam());
-    if (FAILED(rc))
-        return setErrorVrc(rc, tr("%s: IVirtualBox::versionNormalized() failed: %Rrc"), __FUNCTION__, rc);
+    AssertComRCReturn(rc, rc);
     strUrl.appendPrintf("&version=%ls", versionNormalized.raw()); // e.g. 6.1.1
     // strUrl.appendPrintf("&version=6.0.12"); // comment out previous line and uncomment this one for testing
 
-    ULONG revision;
+    ULONG revision = 0;
     rc = mVirtualBox->COMGETTER(Revision)(&revision);
-    if (FAILED(rc))
-        return setErrorVrc(rc, tr("%s: IVirtualBox::revision() failed: %Rrc"), __FUNCTION__, rc);
+    AssertComRCReturn(rc, rc);
     strUrl.appendPrintf("_%u", revision); // e.g. 135618
 
@@ -288,6 +283,5 @@
     ComPtr<ISystemProperties> ptrSystemProperties;
     rc = mVirtualBox->COMGETTER(SystemProperties)(ptrSystemProperties.asOutParam());
-    if (FAILED(rc))
-        return setErrorVrc(rc, tr("%s: IVirtualBox::systemProperties() failed: %Rrc"), __FUNCTION__, rc);
+    AssertComRCReturn(rc, rc);
 
     // Update the VBoxUpdate setting 'VBoxUpdateLastCheckDate'
@@ -295,22 +289,18 @@
     RTTIMESPEC TimeNow;
     char szTimeStr[RTTIME_STR_LEN];
-
     RTTimeToString(RTTimeExplode(&Time, RTTimeNow(&TimeNow)), szTimeStr, sizeof(szTimeStr));
     LogRelFunc(("VBox updating UpdateDate with TimeString = %s\n", szTimeStr));
     rc = ptrSystemProperties->COMSETTER(VBoxUpdateLastCheckDate)(Bstr(szTimeStr).raw());
-    if (FAILED(rc))
-        return rc; // ISystemProperties::setLastCheckDate calls setError() on failure
+    AssertComRCReturn(rc, rc);
 
     // Update the queryURL and the VBoxUpdate setting 'VBoxUpdateCount'
     ULONG cVBoxUpdateCount = 0;
     rc = ptrSystemProperties->COMGETTER(VBoxUpdateCount)(&cVBoxUpdateCount);
-    if (FAILED(rc))
-        return setErrorVrc(rc, tr("%s: retrieving ISystemProperties::VBoxUpdateCount failed: %Rrc"), __FUNCTION__, rc);
+    AssertComRCReturn(rc, rc);
 
     cVBoxUpdateCount++;
 
     rc = ptrSystemProperties->COMSETTER(VBoxUpdateCount)(cVBoxUpdateCount);
-    if (FAILED(rc))
-        return rc; // ISystemProperties::setVBoxUpdateCount calls setError() on failure
+    AssertComRCReturn(rc, rc);
     strUrl.appendPrintf("&count=%u", cVBoxUpdateCount);
 
@@ -318,6 +308,5 @@
     VBoxUpdateTarget_T enmTarget = VBoxUpdateTarget_Stable; // default branch is 'stable'
     rc = ptrSystemProperties->COMGETTER(VBoxUpdateTarget)(&enmTarget);
-    if (FAILED(rc))
-        return setErrorVrc(rc, tr("%s: retrieving ISystemProperties::Target failed: %Rrc"), __FUNCTION__, rc);
+    AssertComRCReturn(rc, rc);
 
     switch (enmTarget)
@@ -336,6 +325,5 @@
 
     rc = ptrSystemProperties->COMSETTER(VBoxUpdateTarget)(enmTarget);
-    if (FAILED(rc))
-        return rc; // ISystemProperties::setTarget calls setError() on failure
+    AssertComRCReturn(rc, rc);
 
     LogRelFunc(("VBox update URL = %s\n", strUrl.c_str()));
@@ -346,6 +334,5 @@
     Bstr version;
     rc = mVirtualBox->COMGETTER(Version)(version.asOutParam()); // e.g. 6.1.0_RC1
-    if (FAILED(rc))
-        return setErrorVrc(rc, tr("%s: IVirtualBox::version() failed: %Rrc"), __FUNCTION__, rc);
+    AssertComRCReturn(rc, rc);
 
     Utf8StrFmt const strUserAgent("VirtualBox %ls <%s>", version.raw(), HostUpdate::i_platformInfo().c_str());
@@ -596,11 +583,9 @@
     ComPtr<ISystemProperties> pSystemProperties;
     HRESULT rc = mVirtualBox->COMGETTER(SystemProperties)(pSystemProperties.asOutParam());
-    if (FAILED(rc))
-        return setErrorVrc(rc, tr("%s: IVirtualBox::systemProperties() failed: %Rrc"), __FUNCTION__, rc);
+    AssertComRCReturn(rc, rc);
 
     BOOL fVBoxUpdateEnabled = true;
     rc = pSystemProperties->COMGETTER(VBoxUpdateEnabled)(&fVBoxUpdateEnabled);
-    if (FAILED(rc))
-        return setErrorVrc(rc, tr("%s: retrieving ISystemProperties::VBoxUpdateEnabled failed: %Rrc"), __FUNCTION__, rc);
+    AssertComRCReturn(rc, rc);
 
     /** @todo r=bird: Not sure if this makes sense, it should at least have a
