Index: /trunk/src/VBox/Main/src-server/HostImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/HostImpl.cpp	(revision 49777)
+++ /trunk/src/VBox/Main/src-server/HostImpl.cpp	(revision 49778)
@@ -275,15 +275,15 @@
      * Create and initialize the USB Proxy Service.
      */
-# if defined (RT_OS_DARWIN)
+# if defined(RT_OS_DARWIN)
     m->pUSBProxyService = new USBProxyServiceDarwin(this);
-# elif defined (RT_OS_LINUX)
+# elif defined(RT_OS_LINUX)
     m->pUSBProxyService = new USBProxyServiceLinux(this);
-# elif defined (RT_OS_OS2)
+# elif defined(RT_OS_OS2)
     m->pUSBProxyService = new USBProxyServiceOs2(this);
-# elif defined (RT_OS_SOLARIS)
+# elif defined(RT_OS_SOLARIS)
     m->pUSBProxyService = new USBProxyServiceSolaris(this);
-# elif defined (RT_OS_WINDOWS)
+# elif defined(RT_OS_WINDOWS)
     m->pUSBProxyService = new USBProxyServiceWindows(this);
-# elif defined (RT_OS_FREEBSD)
+# elif defined(RT_OS_FREEBSD)
     m->pUSBProxyService = new USBProxyServiceFreeBSD(this);
 # else
@@ -302,7 +302,7 @@
     m->hostDnsMonitorProxy.init(HostDnsMonitor::getHostDnsMonitor(), m->pParent);
 
-#if defined (RT_OS_WINDOWS)
+#if defined(RT_OS_WINDOWS)
     m->pHostPowerService = new HostPowerServiceWin(m->pParent);
-#elif defined (RT_OS_DARWIN)
+#elif defined(RT_OS_DARWIN)
     m->pHostPowerService = new HostPowerServiceDarwin(m->pParent);
 #else
@@ -414,5 +414,5 @@
 #endif
 
-#if defined (RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_FREEBSD)
+#if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_FREEBSD)
     /* Extract the list of configured host-only interfaces */
     std::set<Utf8Str> aConfiguredNames;
@@ -448,5 +448,5 @@
     }
 
-#endif /* defined (RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_FREEBSD) */
+#endif /* defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_FREEBSD) */
 
     /* Confirm a successful initialization */
@@ -471,5 +471,5 @@
 #ifdef VBOX_WITH_RESOURCE_USAGE_API
     PerformanceCollector *aCollector = m->pParent->performanceCollector();
-    i_unregisterMetrics (aCollector);
+    i_unregisterMetrics(aCollector);
 #endif /* VBOX_WITH_RESOURCE_USAGE_API */
     /*
@@ -523,18 +523,16 @@
 {
     AutoWriteLock alock(m->pParent->getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
+
     MediaList *pList;
-    aDVDDrives.resize(0);
     HRESULT rc = i_getDrives(DeviceType_DVD, true /* fRefresh */, pList);
-    if (SUCCEEDED(rc))
-    {
-        aDVDDrives.resize(pList->size());
-        size_t i = 0;
-        for (MediaList::const_iterator it= pList->begin(); it!= pList->end(); ++it, ++i)
-        {
-            (*it).queryInterfaceTo(aDVDDrives[i].asOutParam());
-        }
-    }
-
-    return rc;
+    if (FAILED(rc))
+        return rc;
+
+    aDVDDrives.resize(pList->size());
+    size_t i = 0;
+    for (MediaList::const_iterator it = pList->begin(); it != pList->end(); ++it, ++i)
+        (*it).queryInterfaceTo(aDVDDrives[i].asOutParam());
+
+    return S_OK;
 }
 
@@ -550,17 +548,14 @@
 
     MediaList *pList;
-    aFloppyDrives.resize(0);
     HRESULT rc = i_getDrives(DeviceType_Floppy, true /* fRefresh */, pList);
-    if (SUCCEEDED(rc))
-    {
-        aFloppyDrives.resize(pList->size());
-        size_t i = 0;
-        for (MediaList::const_iterator it = pList->begin(); it != pList->end(); ++it, ++i)
-        {
-            (*it).queryInterfaceTo(aFloppyDrives[i].asOutParam());
-        }
-    }
-
-    return rc;
+    if (FAILED(rc))
+        return rc;
+
+    aFloppyDrives.resize(pList->size());
+    size_t i = 0;
+    for (MediaList::const_iterator it = pList->begin(); it != pList->end(); ++it, ++i)
+        (*it).queryInterfaceTo(aFloppyDrives[i].asOutParam());
+
+    return S_OK;
 }
 
@@ -591,5 +586,5 @@
             iface.createObject();
             /* remove the curly bracket at the end */
-            if (SUCCEEDED(iface->init (name, name, Guid (IfGuid), HostNetworkInterfaceType_Bridged)))
+            if (SUCCEEDED(iface->init(name, name, Guid(IfGuid), HostNetworkInterfaceType_Bridged)))
             {
 //                iface->setVirtualBox(m->pParent);
@@ -617,22 +612,18 @@
 HRESULT Host::getNetworkInterfaces(std::vector<ComPtr<IHostNetworkInterface> > &aNetworkInterfaces)
 {
-    aNetworkInterfaces.resize(0);
 #if defined(RT_OS_WINDOWS) || defined(VBOX_WITH_NETFLT) /*|| defined(RT_OS_OS2)*/
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
+
 # ifdef VBOX_WITH_HOSTNETIF_API
     int rc = i_updateNetIfList();
     if (rc)
-    {
         Log(("Failed to get host network interface list with rc=%Rrc\n", rc));
-    }
+
     aNetworkInterfaces.resize(m->llNetIfs.size());
     size_t i = 0;
     for (HostNetworkInterfaceList::iterator it = m->llNetIfs.begin(); it != m->llNetIfs.end(); ++it, ++i)
-    {
         (*it).queryInterfaceTo(aNetworkInterfaces[i].asOutParam());
-    }
 
     return S_OK;
-
 # else
     std::list<ComObjPtr<HostNetworkInterface> > list;
@@ -784,9 +775,8 @@
 #  endif /* RT_OS_LINUX */
 
-    SafeIfaceArray<IHostNetworkInterface> networkInterfaces (list);
+    SafeIfaceArray<IHostNetworkInterface> networkInterfaces(list);
     networkInterfaces.detachTo(ComSafeArrayOutArg(aNetworkInterfaces));
 
     return S_OK;
-
 # endif
 #else
@@ -798,21 +788,24 @@
 HRESULT Host::getUSBDevices(std::vector<ComPtr<IHostUSBDevice> > &aUSBDevices)
 {
-    aUSBDevices.resize(0);
 #ifdef VBOX_WITH_USB
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
+
     HRESULT rc = i_checkUSBProxyService();
-    if (FAILED(rc)) return rc;
+    if (FAILED(rc))
+        return rc;
+
     SafeIfaceArray<IHostUSBDevice> resultArr;
     rc = m->pUSBProxyService->getDeviceCollection(ComSafeArrayAsOutParam(resultArr));
-    if (FAILED(rc)) return rc;
+    if (FAILED(rc))
+        return rc;
+
     aUSBDevices.resize(resultArr.size());
     for (size_t i = 0; i < resultArr.size(); ++i)
     {
-         ComObjPtr<IHostUSBDevice> iHu = resultArr[i];
+         ComPtr<IHostUSBDevice> iHu = resultArr[i];
          iHu.queryInterfaceTo(aUSBDevices[i].asOutParam());
     }
 
-    return rc;
-
+    return S_OK;
 #else
     /* Note: The GUI depends on this method returning E_NOTIMPL with no
@@ -825,5 +818,4 @@
     ReturnComNotImplemented();
 #endif
-    return S_OK;
 }
 
@@ -835,15 +827,14 @@
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    aNameServers.resize(0);
     com::SafeArray<BSTR> resultArr;
-    resultArr.setNull();
     HRESULT rc = m->hostDnsMonitorProxy.GetNameServers(ComSafeArrayAsOutParam(resultArr));
-    if (FAILED(rc)) return rc;
+    if (FAILED(rc))
+        return rc;
+
     aNameServers.resize(resultArr.size());
     for (size_t i = 0; i < resultArr.size(); ++i)
-    {
         aNameServers[i] = com::Utf8Str(resultArr[i]);
-    }
-    return rc;
+
+    return S_OK;
 }
 
@@ -854,11 +845,14 @@
 HRESULT Host::getDomainName(com::Utf8Str &aDomainName)
 {
-    BSTR bstr;
-    HRESULT rc = m->hostDnsMonitorProxy.GetDomainName(&bstr);
-    if SUCCEEDED(rc)
-        aDomainName = com::Utf8Str(bstr);
-    return rc;
     /* XXX: note here should be synchronization with thread polling state
      * changes in name resoving system on host */
+    Bstr tmpName;
+    HRESULT rc = m->hostDnsMonitorProxy.GetDomainName(tmpName.asOutParam());
+    if (FAILED(rc))
+        return rc;
+
+    aDomainName = com::Utf8Str(tmpName);
+
+    return S_OK;
 }
 
@@ -870,32 +864,32 @@
 {
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
+
     com::SafeArray<BSTR> resultArr;
-    aSearchStrings.resize(0);
-    resultArr.setNull();
     HRESULT rc = m->hostDnsMonitorProxy.GetSearchStrings(ComSafeArrayAsOutParam(resultArr));
-    if (FAILED(rc)) return rc;
+    if (FAILED(rc))
+        return rc;
+
     aSearchStrings.resize(resultArr.size());
     for (size_t i = 0; i < resultArr.size(); ++i)
-    {
         aSearchStrings[i] = com::Utf8Str(resultArr[i]);
-    }
-    return rc;
+
+    return S_OK;
 }
 
 HRESULT Host::getUSBDeviceFilters(std::vector<ComPtr<IHostUSBDeviceFilter> > &aUSBDeviceFilters)
 {
-    aUSBDeviceFilters.resize(0);
 #ifdef VBOX_WITH_USB
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
+
     HRESULT rc = i_checkUSBProxyService();
-    if (FAILED(rc)) return rc;
+    if (FAILED(rc))
+        return rc;
+
     aUSBDeviceFilters.resize(m->llUSBDeviceFilters.size());
     size_t i = 0;
     for (USBDeviceFilterList::iterator it = m->llUSBDeviceFilters.begin(); it != m->llUSBDeviceFilters.end(); ++it, ++i)
-    {
         (*it).queryInterfaceTo(aUSBDeviceFilters[i].asOutParam());
-    }
-
-    return rc;
+
+    return S_OK;
 #else
     /* Note: The GUI depends on this method returning E_NOTIMPL with no
@@ -999,5 +993,7 @@
     if (RT_FAILURE(vrc))
         return E_FAIL; /** @todo error reporting? */
+
     aDescription = Utf8Str(szCPUModel);
+
     return S_OK;
 }
@@ -1265,11 +1261,9 @@
     /* No need to lock anything. If there ever will - watch out, the function
      * called below grabs the VirtualBox lock. */
-    IHostNetworkInterface *iHn = aHostInterface;
-    IProgress *iHn2 = aProgress;
-
-    int r = NetIfCreateHostOnlyNetworkInterface(m->pParent, &iHn, &iHn2);
+
+    int r = NetIfCreateHostOnlyNetworkInterface(m->pParent, aHostInterface.asOutParam(), aProgress.asOutParam());
     if (RT_SUCCESS(r))
     {
-        if (!iHn)
+        if (aHostInterface.isNull())
             return setError(E_FAIL,
                             tr("Unable to create a host network interface"));
@@ -1328,5 +1322,5 @@
             return setError(VBOX_E_OBJECT_NOT_FOUND,
                             tr("Host network interface with UUID {%RTuuid} does not exist"),
-                            Guid (aId).raw());
+                            Guid(aId).raw());
         rc = iface->COMGETTER(Name)(name.asOutParam());
         ComAssertComRCRet(rc, rc);
@@ -1383,7 +1377,7 @@
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    clearError();
     MultiResult rc = i_checkUSBProxyService();
-    if (FAILED(rc)) return rc;
+    if (FAILED(rc))
+        return rc;
 
     ComObjPtr<HostUSBDeviceFilter> pFilter;
@@ -1443,7 +1437,7 @@
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    clearError();
     MultiResult rc = i_checkUSBProxyService();
-    if (FAILED(rc)) return rc;
+    if (FAILED(rc))
+        return rc;
 
     if (!m->llUSBDeviceFilters.size())
@@ -1460,5 +1454,5 @@
         /* iterate to the position... */
         USBDeviceFilterList::iterator it = m->llUSBDeviceFilters.begin();
-        std::advance (it, aPosition);
+        std::advance(it, aPosition);
         /* ...get an element from there... */
         filter = *it;
@@ -1590,5 +1584,4 @@
                                               std::vector<ComPtr<IHostNetworkInterface> > &aNetworkInterfaces)
 {
-    aNetworkInterfaces.resize(0);
 #ifdef VBOX_WITH_HOSTNETIF_API
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
@@ -1630,5 +1623,6 @@
     SafeIfaceArray<IHostUSBDevice> devsvec;
     HRESULT rc = COMGETTER(USBDevices)(ComSafeArrayAsOutParam(devsvec));
-    if (FAILED(rc)) return rc;
+    if (FAILED(rc))
+        return rc;
 
     for (size_t i = 0; i < devsvec.size(); ++i)
@@ -1636,8 +1630,9 @@
         Bstr address;
         rc = devsvec[i]->COMGETTER(Address)(address.asOutParam());
-        if (FAILED(rc)) return rc;
+        if (FAILED(rc))
+            return rc;
         if (address == aName)
         {
-            return (ComObjPtr<IHostUSBDevice>(devsvec[i]).queryInterfaceTo(aDevice.asOutParam()));
+            return (ComPtr<IHostUSBDevice>(devsvec[i]).queryInterfaceTo(aDevice.asOutParam()));
         }
     }
@@ -1664,5 +1659,6 @@
     SafeIfaceArray<IHostUSBDevice> devsvec;
     HRESULT rc = COMGETTER(USBDevices)(ComSafeArrayAsOutParam(devsvec));
-    if (FAILED(rc)) return rc;
+    if (FAILED(rc))
+        return rc;
 
     for (size_t i = 0; i < devsvec.size(); ++i)
@@ -1670,13 +1666,14 @@
         Bstr id;
         rc = devsvec[i]->COMGETTER(Id)(id.asOutParam());
-        if (FAILED(rc)) return rc;
+        if (FAILED(rc))
+            return rc;
         if (Guid(id) == aId)
         {
-            return (ComObjPtr<IHostUSBDevice>(devsvec[i]).queryInterfaceTo(aDevice.asOutParam()));
-        }
-    }
-    return setErrorNoLog (VBOX_E_OBJECT_NOT_FOUND, tr (
-        "Could not find a USB device with uuid {%RTuuid}"),
-        aId.raw());
+            return (ComPtr<IHostUSBDevice>(devsvec[i]).queryInterfaceTo(aDevice.asOutParam()));
+        }
+    }
+    return setErrorNoLog(VBOX_E_OBJECT_NOT_FOUND,
+                         tr("Could not find a USB device with uuid {%RTuuid}"),
+                         aId.raw());
 
 #else   /* !VBOX_WITH_USB */
@@ -1704,19 +1701,15 @@
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
     HostVideoInputDeviceList list;
-    aVideoInputDevices.resize(0);
-
-    HRESULT hr = HostVideoInputDevice::queryHostDevices(m->pParent, &list);
-
-    if (SUCCEEDED(hr))
-    {
-        aVideoInputDevices.resize(list.size());
-        size_t i = 0;
-        for (HostVideoInputDeviceList::const_iterator it = list.begin(); it != list.end(); ++it, ++i)
-        {
-            (*it).queryInterfaceTo(aVideoInputDevices[i].asOutParam());
-        }
-    }
-
-    return hr;
+
+    HRESULT rc = HostVideoInputDevice::queryHostDevices(m->pParent, &list);
+    if (FAILED(rc))
+        return rc;
+
+    aVideoInputDevices.resize(list.size());
+    size_t i = 0;
+    for (HostVideoInputDeviceList::const_iterator it = list.begin(); it != list.end(); ++it, ++i)
+        (*it).queryInterfaceTo(aVideoInputDevices[i].asOutParam());
+
+    return S_OK;
 }
 
@@ -1729,5 +1722,6 @@
 #ifdef VBOX_WITH_USB
     AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+    if (FAILED(autoCaller.rc()))
+        return autoCaller.rc();
 
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
@@ -1741,5 +1735,6 @@
         pFilter.createObject();
         rc = pFilter->init(this, f);
-        if (FAILED(rc)) break;
+        if (FAILED(rc))
+            break;
 
         m->llUSBDeviceFilters.push_back(pFilter);
@@ -1763,5 +1758,6 @@
 #ifdef VBOX_WITH_USB
     AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+    if (FAILED(autoCaller.rc()))
+        return autoCaller.rc();
 
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
@@ -1962,5 +1958,5 @@
  * @param strLocationFull Name (path) of host drive to look for.
  * @param fRefresh Whether to refresh the host drives list (see getDrives())
- * @param pMedium Medium object, if found…
+ * @param pMedium Medium object, if found
  * @return VBOX_E_OBJECT_NOT_FOUND if not found, or S_OK if found, or errors from getDrives().
  */
@@ -2170,5 +2166,6 @@
 {
     AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+    if (FAILED(autoCaller.rc()))
+        return autoCaller.rc();
 
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
@@ -2182,5 +2179,6 @@
 {
     AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+    if (FAILED(autoCaller.rc()))
+        return autoCaller.rc();
 
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
@@ -2212,5 +2210,6 @@
 {
     AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+    if (FAILED(autoCaller.rc()))
+        return autoCaller.rc();
 
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
@@ -2443,5 +2442,5 @@
     if (!gLibHalCheckPresence())
         return false;
-    gDBusErrorInit (&dbusError);
+    gDBusErrorInit(&dbusError);
     DBusConnection *dbusConnection = gDBusBusGet(DBUS_BUS_SYSTEM, &dbusError);
     if (dbusConnection != 0)
@@ -2450,5 +2449,5 @@
         if (halContext != 0)
         {
-            if (gLibHalCtxSetDBusConnection (halContext, dbusConnection))
+            if (gLibHalCtxSetDBusConnection(halContext, dbusConnection))
             {
                 if (gLibHalCtxInit(halContext, &dbusError))
@@ -2490,6 +2489,6 @@
                                         if ((vendor != 0) && (vendor[0] != 0))
                                         {
-                                            description = Utf8StrFmt ("%s %s",
-                                                                      vendor, product);
+                                            description = Utf8StrFmt("%s %s",
+                                                                     vendor, product);
                                         }
                                         else
@@ -2501,5 +2500,5 @@
                                         hostDVDDriveObj->init(m->pParent, DeviceType_DVD,
                                                               Bstr(devNode), Bstr(description));
-                                        list.push_back (hostDVDDriveObj);
+                                        list.push_back(hostDVDDriveObj);
                                     }
                                     else
@@ -2515,5 +2514,5 @@
                                         hostDVDDriveObj->init(m->pParent, DeviceType_DVD,
                                                               Bstr(devNode));
-                                        list.push_back (hostDVDDriveObj);
+                                        list.push_back(hostDVDDriveObj);
                                     }
                                     if (vendor != 0)
@@ -2596,5 +2595,5 @@
     if (!gLibHalCheckPresence())
         return false;
-    gDBusErrorInit (&dbusError);
+    gDBusErrorInit(&dbusError);
     DBusConnection *dbusConnection = gDBusBusGet(DBUS_BUS_SYSTEM, &dbusError);
     if (dbusConnection != 0)
@@ -2603,5 +2602,5 @@
         if (halContext != 0)
         {
-            if (gLibHalCtxSetDBusConnection (halContext, dbusConnection))
+            if (gLibHalCtxSetDBusConnection(halContext, dbusConnection))
             {
                 if (gLibHalCtxInit(halContext, &dbusError))
@@ -2653,6 +2652,6 @@
                                         if ((vendor != 0) && (vendor[0] != 0))
                                         {
-                                            description = Utf8StrFmt ("%s %s",
-                                                                      vendor, product);
+                                            description = Utf8StrFmt("%s %s",
+                                                                     vendor, product);
                                         }
                                         else
@@ -2664,5 +2663,5 @@
                                         hostFloppyDrive->init(m->pParent, DeviceType_DVD,
                                                               Bstr(devNode), Bstr(description));
-                                        list.push_back (hostFloppyDrive);
+                                        list.push_back(hostFloppyDrive);
                                     }
                                     else
@@ -2678,5 +2677,5 @@
                                         hostFloppyDrive->init(m->pParent, DeviceType_DVD,
                                                               Bstr(devNode));
-                                        list.push_back (hostFloppyDrive);
+                                        list.push_back(hostFloppyDrive);
                                     }
                                     if (vendor != 0)
@@ -2833,5 +2832,5 @@
                         hostDVDDriveObj.createObject();
                         hostDVDDriveObj->init(m->pParent, DeviceType_DVD, Bstr(rawDevName));
-                        list.push_back (hostDVDDriveObj);
+                        list.push_back(hostDVDDriveObj);
                     }
                     free(rawDevName);
@@ -2925,5 +2924,6 @@
 {
     AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+    if (FAILED(autoCaller.rc()))
+        return autoCaller.rc();
 
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
@@ -2950,7 +2950,7 @@
                                   tr("The USB Proxy Service has not yet been ported to this host"));
             default:
-                return setWarning (E_FAIL, "%s: %Rrc",
-                                   tr ("Could not load the Host USB Proxy service"),
-                                   m->pUSBProxyService->getLastError());
+                return setWarning(E_FAIL, "%s: %Rrc",
+                                  tr("Could not load the Host USB Proxy service"),
+                                  m->pUSBProxyService->getLastError());
         }
     }
@@ -3054,5 +3054,5 @@
                                                               fsRootUsageUsed,
                                                               fsRootUsageFree);
-    aCollector->registerBaseMetric (fsRootUsage);
+    aCollector->registerBaseMetric(fsRootUsage);
 
     aCollector->registerMetric(new pm::Metric(fsRootUsage, fsRootUsageTotal, 0));
@@ -3093,5 +3093,5 @@
         pm::BaseMetric *fsLoad  = new pm::HostDiskLoadRaw(hal, this, strName + "/Load",
                                                          *it, fsLoadUtil);
-        aCollector->registerBaseMetric (fsLoad);
+        aCollector->registerBaseMetric(fsLoad);
 
         aCollector->registerMetric(new pm::Metric(fsLoad, fsLoadUtil, 0));
@@ -3110,5 +3110,5 @@
         pm::BaseMetric *fsUsage = new pm::HostDiskUsage(hal, this, strName + "/Usage",
                                                         *it, fsUsageTotal);
-        aCollector->registerBaseMetric (fsUsage);
+        aCollector->registerBaseMetric(fsUsage);
 
         aCollector->registerMetric(new pm::Metric(fsUsage, fsUsageTotal, 0));
@@ -3153,12 +3153,12 @@
     pm::BaseMetric *cpuLoad = new pm::HostCpuLoadRaw(hal, this, cpuLoadUser, cpuLoadKernel,
                                           cpuLoadIdle);
-    aCollector->registerBaseMetric (cpuLoad);
+    aCollector->registerBaseMetric(cpuLoad);
     pm::BaseMetric *cpuMhz = new pm::HostCpuMhz(hal, this, cpuMhzSM);
-    aCollector->registerBaseMetric (cpuMhz);
+    aCollector->registerBaseMetric(cpuMhz);
     pm::BaseMetric *ramUsage = new pm::HostRamUsage(hal, this,
                                                     ramUsageTotal,
                                                     ramUsageUsed,
                                                     ramUsageFree);
-    aCollector->registerBaseMetric (ramUsage);
+    aCollector->registerBaseMetric(ramUsage);
     pm::BaseMetric *ramVmm = new pm::HostRamVmm(aCollector->getGuestManager(), this,
                                                 ramVMMUsed,
@@ -3166,5 +3166,5 @@
                                                 ramVMMBallooned,
                                                 ramVMMShared);
-    aCollector->registerBaseMetric (ramVmm);
+    aCollector->registerBaseMetric(ramVmm);
 
     aCollector->registerMetric(new pm::Metric(cpuLoad, cpuLoadUser, 0));
@@ -3258,5 +3258,5 @@
 }
 
-void Host::i_unregisterMetrics (PerformanceCollector *aCollector)
+void Host::i_unregisterMetrics(PerformanceCollector *aCollector)
 {
     aCollector->unregisterMetricsFor(this);
