[PATCH 2/5] vbox: remove extra spaces from variable initializations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 src/vbox/vbox_common.c  | 282 ++++++++++++++++++++++++------------------------
 src/vbox/vbox_storage.c |   2 +-
 src/vbox/vbox_tmpl.c    |  96 ++++++++---------
 3 files changed, 190 insertions(+), 190 deletions(-)

diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c
index 4754a55..ccc7dc3 100644
--- a/src/vbox/vbox_common.c
+++ b/src/vbox/vbox_common.c
@@ -212,8 +212,8 @@ static char *vboxGenerateMediumName(PRUint32  storageBus,
                                     PRUint32 *aMaxSlotPerPort)
 {
     const char *prefix = NULL;
-    char *name  = NULL;
-    int   total = 0;
+    char *name = NULL;
+    int total = 0;
     PRUint32 maxPortPerInst = 0;
     PRUint32 maxSlotPerPort = 0;
 
@@ -477,7 +477,7 @@ static int
 vboxDomainSave(virDomainPtr dom, const char *path ATTRIBUTE_UNUSED)
 {
     vboxGlobalData *data = dom->conn->privateData;
-    IConsole *console    = NULL;
+    IConsole *console = NULL;
     vboxIIDUnion iid;
     IMachine *machine = NULL;
     IProgress *progress = NULL;
@@ -703,7 +703,7 @@ static virDomainPtr vboxDomainLookupByID(virConnectPtr conn, int id)
     IMachine *machine;
     PRBool isAccessible = PR_FALSE;
     PRUnichar *machineNameUtf16 = NULL;
-    char *machineNameUtf8  = NULL;
+    char *machineNameUtf8 = NULL;
     vboxIIDUnion iid;
     unsigned char uuid[VIR_UUID_BUFLEN];
     PRUint32 state;
@@ -779,7 +779,7 @@ virDomainPtr vboxDomainLookupByUUID(virConnectPtr conn,
     vboxGlobalData *data = conn->privateData;
     vboxArray machines = VBOX_ARRAY_INITIALIZER;
     vboxIIDUnion iid;
-    char *machineNameUtf8  = NULL;
+    char *machineNameUtf8 = NULL;
     PRUnichar *machineNameUtf16 = NULL;
     unsigned char iid_as_uuid[VIR_UUID_BUFLEN];
     size_t i;
@@ -856,7 +856,7 @@ vboxDomainLookupByName(virConnectPtr conn, const char *name)
     vboxGlobalData *data = conn->privateData;
     vboxArray machines = VBOX_ARRAY_INITIALIZER;
     vboxIIDUnion iid;
-    char *machineNameUtf8  = NULL;
+    char *machineNameUtf8 = NULL;
     PRUnichar *machineNameUtf16 = NULL;
     unsigned char uuid[VIR_UUID_BUFLEN];
     size_t i;
@@ -929,7 +929,7 @@ vboxSetBootDeviceOrder(virDomainDefPtr def, vboxGlobalData *data,
                        IMachine *machine)
 {
     ISystemProperties *systemProperties = NULL;
-    PRUint32 maxBootPosition            = 0;
+    PRUint32 maxBootPosition = 0;
     size_t i = 0;
 
     VIR_DEBUG("def->os.type             %s", virDomainOSTypeToString(def->os.type));
@@ -1060,15 +1060,15 @@ vboxAttachDrivesNew(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine
                                              ? "True" : "False"));
 
         if (type == VIR_STORAGE_TYPE_FILE && src) {
-            IMedium   *medium          = NULL;
+            IMedium *medium = NULL;
             vboxIIDUnion mediumUUID;
             PRUnichar *mediumFileUtf16 = NULL;
-            PRUint32   storageBus      = StorageBus_Null;
-            PRUint32   deviceType      = DeviceType_Null;
-            PRUint32   accessMode      = AccessMode_ReadOnly;
-            PRInt32    deviceInst      = 0;
-            PRInt32    devicePort      = 0;
-            PRInt32    deviceSlot      = 0;
+            PRUint32 storageBus = StorageBus_Null;
+            PRUint32 deviceType = DeviceType_Null;
+            PRUint32 accessMode = AccessMode_ReadOnly;
+            PRInt32 deviceInst = 0;
+            PRInt32 devicePort = 0;
+            PRInt32 deviceSlot = 0;
 
             VBOX_IID_INITIALIZE(&mediumUUID);
             VBOX_UTF8_TO_UTF16(src, &mediumFileUtf16);
@@ -1265,8 +1265,8 @@ static int
 vboxAttachNetwork(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine)
 {
     ISystemProperties *systemProperties = NULL;
-    PRUint32 chipsetType                = ChipsetType_Null;
-    PRUint32 networkAdapterCount        = 0;
+    PRUint32 chipsetType = ChipsetType_Null;
+    PRUint32 networkAdapterCount = 0;
     size_t i = 0;
 
     if (gVBoxAPI.chipsetType)
@@ -1284,7 +1284,7 @@ vboxAttachNetwork(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine)
 
     for (i = 0; (i < def->nnets) && (i < networkAdapterCount); i++) {
         INetworkAdapter *adapter = NULL;
-        PRUint32 adapterType     = NetworkAdapterType_Null;
+        PRUint32 adapterType = NetworkAdapterType_Null;
         char macaddr[VIR_MAC_STRING_BUFLEN] = {0};
         char macaddrvbox[VIR_MAC_STRING_BUFLEN - 5] = {0};
         PRUnichar *MACAddress = NULL;
@@ -1411,7 +1411,7 @@ static void
 vboxAttachSerial(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine)
 {
     ISystemProperties *systemProperties = NULL;
-    PRUint32 serialPortCount            = 0;
+    PRUint32 serialPortCount = 0;
     size_t i = 0;
 
     gVBoxAPI.UIVirtualBox.GetSystemProperties(data->vboxObj, &systemProperties);
@@ -1487,7 +1487,7 @@ static void
 vboxAttachParallel(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine)
 {
     ISystemProperties *systemProperties = NULL;
-    PRUint32 parallelPortCount          = 0;
+    PRUint32 parallelPortCount = 0;
     size_t i = 0;
 
     gVBoxAPI.UIVirtualBox.GetSystemProperties(data->vboxObj, &systemProperties);
@@ -1575,9 +1575,9 @@ vboxAttachVideo(virDomainDefPtr def, IMachine *machine)
 static void
 vboxAttachDisplay(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine)
 {
-    int vrdpPresent  = 0;
-    int sdlPresent   = 0;
-    int guiPresent   = 0;
+    int vrdpPresent = 0;
+    int sdlPresent = 0;
+    int guiPresent = 0;
     char *guiDisplay = NULL;
     char *sdlDisplay = NULL;
     size_t i = 0;
@@ -1652,7 +1652,7 @@ vboxAttachDisplay(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine)
 
     if ((vrdpPresent == 1) && (guiPresent == 0) && (sdlPresent == 0)) {
         /* store extradata key that frontend is set to vrdp */
-        PRUnichar *keyTypeUtf16   = NULL;
+        PRUnichar *keyTypeUtf16 = NULL;
         PRUnichar *valueTypeUtf16 = NULL;
 
         VBOX_UTF8_TO_UTF16("FRONTEND/Type", &keyTypeUtf16);
@@ -1665,9 +1665,9 @@ vboxAttachDisplay(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine)
 
     } else if ((guiPresent == 0) && (sdlPresent == 1)) {
         /* store extradata key that frontend is set to sdl */
-        PRUnichar *keyTypeUtf16      = NULL;
-        PRUnichar *valueTypeUtf16    = NULL;
-        PRUnichar *keyDislpayUtf16   = NULL;
+        PRUnichar *keyTypeUtf16 = NULL;
+        PRUnichar *valueTypeUtf16 = NULL;
+        PRUnichar *keyDislpayUtf16 = NULL;
         PRUnichar *valueDisplayUtf16 = NULL;
 
         VBOX_UTF8_TO_UTF16("FRONTEND/Type", &keyTypeUtf16);
@@ -1691,9 +1691,9 @@ vboxAttachDisplay(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine)
 
     } else {
         /* if all are set then default is gui, with vrdp turned on */
-        PRUnichar *keyTypeUtf16      = NULL;
-        PRUnichar *valueTypeUtf16    = NULL;
-        PRUnichar *keyDislpayUtf16   = NULL;
+        PRUnichar *keyTypeUtf16 = NULL;
+        PRUnichar *valueTypeUtf16 = NULL;
+        PRUnichar *keyDislpayUtf16 = NULL;
         PRUnichar *valueDisplayUtf16 = NULL;
 
         VBOX_UTF8_TO_UTF16("FRONTEND/Type", &keyTypeUtf16);
@@ -1767,13 +1767,13 @@ vboxAttachUSB(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine)
     gVBoxAPI.UIUSBCommon.Enable(USBCommon);
 
     for (i = 0; i < def->nhostdevs; i++) {
-        char *filtername           = NULL;
+        char *filtername = NULL;
         PRUnichar *filternameUtf16 = NULL;
-        IUSBDeviceFilter *filter   = NULL;
-        PRUnichar *vendorIdUtf16  = NULL;
-        char vendorId[40]         = {0};
+        IUSBDeviceFilter *filter = NULL;
+        PRUnichar *vendorIdUtf16 = NULL;
+        char vendorId[40] = {0};
         PRUnichar *productIdUtf16 = NULL;
-        char productId[40]        = {0};
+        char productId[40] = {0};
 
         if (def->hostdevs[i]->mode != VIR_DOMAIN_HOSTDEV_MODE_SUBSYS)
             continue;
@@ -1855,10 +1855,10 @@ static virDomainPtr
 vboxDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flags)
 {
     vboxGlobalData *data = conn->privateData;
-    IMachine       *machine     = NULL;
-    IBIOSSettings  *bios        = NULL;
+    IMachine *machine = NULL;
+    IBIOSSettings *bios = NULL;
     vboxIIDUnion mchiid;
-    virDomainDefPtr def         = NULL;
+    virDomainDefPtr def = NULL;
     nsresult rc;
     char uuidstr[VIR_UUID_STRING_BUFLEN];
     virDomainPtr ret = NULL;
@@ -2040,7 +2040,7 @@ detachDevices_common(vboxGlobalData *data, vboxIIDUnion *iidu)
 static int vboxDomainUndefineFlags(virDomainPtr dom, unsigned int flags)
 {
     vboxGlobalData *data = dom->conn->privateData;
-    IMachine *machine    = NULL;
+    IMachine *machine = NULL;
     vboxIIDUnion iid;
     nsresult rc;
     int ret = -1;
@@ -2083,20 +2083,20 @@ static int
 vboxStartMachine(virDomainPtr dom, int maxDomID, IMachine *machine, vboxIIDUnion *iid)
 {
     vboxGlobalData *data = dom->conn->privateData;
-    int vrdpPresent              = 0;
-    int sdlPresent               = 0;
-    int guiPresent               = 0;
-    char *guiDisplay             = NULL;
-    char *sdlDisplay             = NULL;
-    PRUnichar *keyTypeUtf16      = NULL;
-    PRUnichar *valueTypeUtf16    = NULL;
-    char      *valueTypeUtf8     = NULL;
-    PRUnichar *keyDislpayUtf16   = NULL;
+    int vrdpPresent = 0;
+    int sdlPresent = 0;
+    int guiPresent = 0;
+    char *guiDisplay = NULL;
+    char *sdlDisplay = NULL;
+    PRUnichar *keyTypeUtf16 = NULL;
+    PRUnichar *valueTypeUtf16 = NULL;
+    char *valueTypeUtf8 = NULL;
+    PRUnichar *keyDislpayUtf16 = NULL;
     PRUnichar *valueDisplayUtf16 = NULL;
-    char      *valueDisplayUtf8  = NULL;
-    IProgress *progress          = NULL;
-    PRUnichar *env               = NULL;
-    PRUnichar *sessionType       = NULL;
+    char *valueDisplayUtf8 = NULL;
+    IProgress *progress = NULL;
+    PRUnichar *env = NULL;
+    PRUnichar *sessionType = NULL;
     nsresult rc;
     int ret = -1;
 
@@ -2342,7 +2342,7 @@ static int vboxDomainIsActive(virDomainPtr dom)
     vboxGlobalData *data = dom->conn->privateData;
     vboxArray machines = VBOX_ARRAY_INITIALIZER;
     vboxIIDUnion iid;
-    char *machineNameUtf8  = NULL;
+    char *machineNameUtf8 = NULL;
     PRUnichar *machineNameUtf16 = NULL;
     unsigned char uuid[VIR_UUID_BUFLEN];
     size_t i;
@@ -2456,10 +2456,10 @@ static int vboxDomainIsUpdated(virDomainPtr dom)
 static int vboxDomainSuspend(virDomainPtr dom)
 {
     vboxGlobalData *data = dom->conn->privateData;
-    IMachine *machine    = NULL;
+    IMachine *machine = NULL;
     vboxIIDUnion iid;
-    IConsole *console    = NULL;
-    PRBool isAccessible  = PR_FALSE;
+    IConsole *console = NULL;
+    PRBool isAccessible = PR_FALSE;
     PRUint32 state;
     int ret = -1;
 
@@ -2507,9 +2507,9 @@ static int vboxDomainSuspend(virDomainPtr dom)
 static int vboxDomainResume(virDomainPtr dom)
 {
     vboxGlobalData *data = dom->conn->privateData;
-    IMachine *machine    = NULL;
+    IMachine *machine = NULL;
     vboxIIDUnion iid;
-    IConsole *console    = NULL;
+    IConsole *console = NULL;
     PRUint32 state;
     PRBool isAccessible = PR_FALSE;
     int ret = -1;
@@ -2558,11 +2558,11 @@ static int vboxDomainResume(virDomainPtr dom)
 static int vboxDomainShutdownFlags(virDomainPtr dom, unsigned int flags)
 {
     vboxGlobalData *data = dom->conn->privateData;
-    IMachine *machine    = NULL;
+    IMachine *machine = NULL;
     vboxIIDUnion iid;
-    IConsole *console    = NULL;
+    IConsole *console = NULL;
     PRUint32 state;
-    PRBool isAccessible  = PR_FALSE;
+    PRBool isAccessible = PR_FALSE;
     int ret = -1;
 
     if (!data->vboxObj)
@@ -2615,11 +2615,11 @@ static int vboxDomainShutdown(virDomainPtr dom)
 static int vboxDomainReboot(virDomainPtr dom, unsigned int flags)
 {
     vboxGlobalData *data = dom->conn->privateData;
-    IMachine *machine    = NULL;
+    IMachine *machine = NULL;
     vboxIIDUnion iid;
-    IConsole *console    = NULL;
+    IConsole *console = NULL;
     PRUint32 state;
-    PRBool isAccessible  = PR_FALSE;
+    PRBool isAccessible = PR_FALSE;
     int ret = -1;
 
     if (!data->vboxObj)
@@ -2663,11 +2663,11 @@ static int vboxDomainReboot(virDomainPtr dom, unsigned int flags)
 static int vboxDomainDestroyFlags(virDomainPtr dom, unsigned int flags)
 {
     vboxGlobalData *data = dom->conn->privateData;
-    IMachine *machine    = NULL;
+    IMachine *machine = NULL;
     vboxIIDUnion iid;
-    IConsole *console    = NULL;
+    IConsole *console = NULL;
     PRUint32 state;
-    PRBool isAccessible  = PR_FALSE;
+    PRBool isAccessible = PR_FALSE;
     int ret = -1;
 
     if (!data->vboxObj)
@@ -2729,10 +2729,10 @@ static char *vboxDomainGetOSType(virDomainPtr dom ATTRIBUTE_UNUSED) {
 static int vboxDomainSetMemory(virDomainPtr dom, unsigned long memory)
 {
     vboxGlobalData *data = dom->conn->privateData;
-    IMachine *machine    = NULL;
+    IMachine *machine = NULL;
     vboxIIDUnion iid;
     PRUint32 state;
-    PRBool isAccessible  = PR_FALSE;
+    PRBool isAccessible = PR_FALSE;
     nsresult rc;
     int ret = -1;
 
@@ -2788,7 +2788,7 @@ static int vboxDomainGetInfo(virDomainPtr dom, virDomainInfoPtr info)
 {
     vboxGlobalData *data = dom->conn->privateData;
     vboxArray machines = VBOX_ARRAY_INITIALIZER;
-    char *machineName    = NULL;
+    char *machineName = NULL;
     PRUnichar *machineNameUtf16 = NULL;
     nsresult rc;
     size_t i = 0;
@@ -2828,7 +2828,7 @@ static int vboxDomainGetInfo(virDomainPtr dom, virDomainInfoPtr info)
             * VM is remote), return zero for cputime. Get the
             * number of CPU.
             */
-            PRUint32 CPUCount   = 0;
+            PRUint32 CPUCount = 0;
             PRUint32 memorySize = 0;
             PRUint32 state;
             PRUint32 maxMemorySize = 4 * 1024;
@@ -2902,9 +2902,9 @@ static int vboxDomainSetVcpusFlags(virDomainPtr dom, unsigned int nvcpus,
                                    unsigned int flags)
 {
     vboxGlobalData *data = dom->conn->privateData;
-    IMachine *machine    = NULL;
+    IMachine *machine = NULL;
     vboxIIDUnion iid;
-    PRUint32  CPUCount   = nvcpus;
+    PRUint32 CPUCount = nvcpus;
     nsresult rc;
     int ret = -1;
 
@@ -3043,15 +3043,15 @@ vboxHostDeviceGetXMLDesc(vboxGlobalData *data, virDomainDefPtr def, IMachine *ma
     }
 
     for (i = 0; i < deviceFilters.count; i++) {
-        PRBool active                  = PR_FALSE;
+        PRBool active = PR_FALSE;
         IUSBDeviceFilter *deviceFilter = deviceFilters.items[i];
-        PRUnichar *vendorIdUtf16       = NULL;
-        char *vendorIdUtf8             = NULL;
-        unsigned vendorId              = 0;
-        PRUnichar *productIdUtf16      = NULL;
-        char *productIdUtf8            = NULL;
-        unsigned productId             = 0;
-        char *endptr                   = NULL;
+        PRUnichar *vendorIdUtf16 = NULL;
+        char *vendorIdUtf8 = NULL;
+        unsigned vendorId = 0;
+        PRUnichar *productIdUtf16 = NULL;
+        char *productIdUtf8 = NULL;
+        unsigned productId = 0;
+        char *endptr = NULL;
 
         gVBoxAPI.UIUSBDeviceFilter.GetActive(deviceFilter, &active);
         if (!active)
@@ -3101,12 +3101,12 @@ static void
 vboxDumpIDEHDDsNew(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine)
 {
     /* dump IDE hdds if present */
-    vboxArray mediumAttachments         = VBOX_ARRAY_INITIALIZER;
+    vboxArray mediumAttachments = VBOX_ARRAY_INITIALIZER;
     bool error = false;
     int diskCount = 0;
     size_t i;
-    PRUint32   maxPortPerInst[StorageBus_Floppy + 1] = {};
-    PRUint32   maxSlotPerPort[StorageBus_Floppy + 1] = {};
+    PRUint32 maxPortPerInst[StorageBus_Floppy + 1] = {};
+    PRUint32 maxSlotPerPort[StorageBus_Floppy + 1] = {};
 
     if (gVBoxAPI.oldMediumInterface)
         VIR_WARN("This function may not work in current vbox version");
@@ -3151,15 +3151,15 @@ vboxDumpIDEHDDsNew(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine)
         IMediumAttachment *imediumattach = mediumAttachments.items[i];
         IStorageController *storageController = NULL;
         PRUnichar *storageControllerName = NULL;
-        PRUint32   deviceType     = DeviceType_Null;
-        PRUint32   storageBus     = StorageBus_Null;
-        PRBool     readOnly       = PR_FALSE;
-        IMedium   *medium         = NULL;
+        PRUint32 deviceType = DeviceType_Null;
+        PRUint32 storageBus = StorageBus_Null;
+        PRBool readOnly = PR_FALSE;
+        IMedium *medium = NULL;
         PRUnichar *mediumLocUtf16 = NULL;
-        char      *mediumLocUtf8  = NULL;
-        PRUint32   deviceInst     = 0;
-        PRInt32    devicePort     = 0;
-        PRInt32    deviceSlot     = 0;
+        char *mediumLocUtf8 = NULL;
+        PRUint32 deviceInst = 0;
+        PRInt32 devicePort = 0;
+        PRInt32 deviceSlot = 0;
 
         if (!imediumattach)
             continue;
@@ -3515,10 +3515,10 @@ vboxDumpNetwork(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine, PR
 
             gVBoxAPI.UINetworkAdapter.GetEnabled(adapter, &enabled);
             if (enabled) {
-                PRUint32 attachmentType    = NetworkAttachmentType_Null;
-                PRUint32 adapterType       = NetworkAdapterType_Null;
+                PRUint32 attachmentType = NetworkAttachmentType_Null;
+                PRUint32 adapterType = NetworkAdapterType_Null;
                 PRUnichar *MACAddressUtf16 = NULL;
-                char *MACAddress           = NULL;
+                char *MACAddress = NULL;
                 char macaddr[VIR_MAC_STRING_BUFLEN] = {0};
 
                 gVBoxAPI.UINetworkAdapter.GetAttachmentType(adapter, &attachmentType);
@@ -3528,7 +3528,7 @@ vboxDumpNetwork(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine, PR
 
                 } else if (attachmentType == NetworkAttachmentType_Bridged) {
                     PRUnichar *hostIntUtf16 = NULL;
-                    char *hostInt           = NULL;
+                    char *hostInt = NULL;
 
                     def->nets[netAdpIncCnt]->type = VIR_DOMAIN_NET_TYPE_BRIDGE;
 
@@ -3542,7 +3542,7 @@ vboxDumpNetwork(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine, PR
 
                 } else if (attachmentType == NetworkAttachmentType_Internal) {
                     PRUnichar *intNetUtf16 = NULL;
-                    char *intNet           = NULL;
+                    char *intNet = NULL;
 
                     def->nets[netAdpIncCnt]->type = VIR_DOMAIN_NET_TYPE_INTERNAL;
 
@@ -3556,7 +3556,7 @@ vboxDumpNetwork(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine, PR
 
                 } else if (attachmentType == NetworkAttachmentType_HostOnly) {
                     PRUnichar *hostIntUtf16 = NULL;
-                    char *hostInt           = NULL;
+                    char *hostInt = NULL;
 
                     def->nets[netAdpIncCnt]->type = VIR_DOMAIN_NET_TYPE_NETWORK;
 
@@ -3696,11 +3696,11 @@ vboxDumpSerial(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine, PRU
 
             gVBoxAPI.UISerialPort.GetEnabled(serialPort, &enabled);
             if (enabled) {
-                PRUint32 hostMode    = PortMode_Disconnected;
-                PRUint32 IOBase      = 0;
-                PRUint32 IRQ         = 0;
+                PRUint32 hostMode = PortMode_Disconnected;
+                PRUint32 IOBase = 0;
+                PRUint32 IRQ = 0;
                 PRUnichar *pathUtf16 = NULL;
-                char *path           = NULL;
+                char *path = NULL;
 
                 gVBoxAPI.UISerialPort.GetHostMode(serialPort, &hostMode);
                 if (hostMode == PortMode_HostPipe) {
@@ -3785,10 +3785,10 @@ vboxDumpParallel(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine, P
 
             gVBoxAPI.UIParallelPort.GetEnabled(parallelPort, &enabled);
             if (enabled) {
-                PRUint32 IOBase      = 0;
-                PRUint32 IRQ         = 0;
+                PRUint32 IOBase = 0;
+                PRUint32 IRQ = 0;
                 PRUnichar *pathUtf16 = NULL;
-                char *path           = NULL;
+                char *path = NULL;
 
                 gVBoxAPI.UIParallelPort.GetIRQ(parallelPort, &IRQ);
                 gVBoxAPI.UIParallelPort.GetIOBase(parallelPort, &IOBase);
@@ -3820,23 +3820,23 @@ vboxDumpParallel(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine, P
 static char *vboxDomainGetXMLDesc(virDomainPtr dom, unsigned int flags)
 {
     vboxGlobalData *data = dom->conn->privateData;
-    virDomainDefPtr def  = NULL;
-    IMachine *machine    = NULL;
+    virDomainDefPtr def = NULL;
+    IMachine *machine = NULL;
     vboxIIDUnion iid;
     PRBool accessible = PR_FALSE;
     size_t i = 0;
-    PRBool PAEEnabled                   = PR_FALSE;
-    PRBool ACPIEnabled                  = PR_FALSE;
-    PRBool IOAPICEnabled                = PR_FALSE;
-    PRUint32 CPUCount                   = 0;
-    PRUint32 memorySize                 = 0;
-    PRUint32 networkAdapterCount        = 0;
-    PRUint32 maxMemorySize              = 4 * 1024;
-    PRUint32 maxBootPosition            = 0;
-    PRUint32 serialPortCount            = 0;
-    PRUint32 parallelPortCount          = 0;
-    IBIOSSettings *bios                 = NULL;
-    PRUint32 chipsetType                = ChipsetType_Null;
+    PRBool PAEEnabled = PR_FALSE;
+    PRBool ACPIEnabled = PR_FALSE;
+    PRBool IOAPICEnabled = PR_FALSE;
+    PRUint32 CPUCount = 0;
+    PRUint32 memorySize = 0;
+    PRUint32 networkAdapterCount = 0;
+    PRUint32 maxMemorySize = 4 * 1024;
+    PRUint32 maxBootPosition = 0;
+    PRUint32 serialPortCount = 0;
+    PRUint32 parallelPortCount = 0;
+    IBIOSSettings *bios = NULL;
+    PRUint32 chipsetType = ChipsetType_Null;
     ISystemProperties *systemProperties = NULL;
     char *ret = NULL;
 
@@ -3989,7 +3989,7 @@ static int vboxConnectListDefinedDomains(virConnectPtr conn,
 {
     vboxGlobalData *data = conn->privateData;
     vboxArray machines = VBOX_ARRAY_INITIALIZER;
-    char *machineName    = NULL;
+    char *machineName = NULL;
     PRUnichar *machineNameUtf16 = NULL;
     PRUint32 state;
     nsresult rc;
@@ -4095,11 +4095,11 @@ static int vboxDomainAttachDeviceImpl(virDomainPtr dom,
                                       int mediaChangeOnly ATTRIBUTE_UNUSED)
 {
     vboxGlobalData *data = dom->conn->privateData;
-    IMachine *machine    = NULL;
+    IMachine *machine = NULL;
     vboxIIDUnion iid;
     PRUint32 state;
-    virDomainDefPtr def  = NULL;
-    virDomainDeviceDefPtr dev  = NULL;
+    virDomainDefPtr def = NULL;
+    virDomainDeviceDefPtr dev = NULL;
     nsresult rc;
     int ret = -1;
 
@@ -4226,11 +4226,11 @@ static int vboxDomainUpdateDeviceFlags(virDomainPtr dom, const char *xml,
 static int vboxDomainDetachDevice(virDomainPtr dom, const char *xml)
 {
     vboxGlobalData *data = dom->conn->privateData;
-    IMachine *machine    = NULL;
+    IMachine *machine = NULL;
     vboxIIDUnion iid;
     PRUint32 state;
-    virDomainDefPtr def  = NULL;
-    virDomainDeviceDefPtr dev  = NULL;
+    virDomainDefPtr def = NULL;
+    virDomainDeviceDefPtr dev = NULL;
     nsresult rc;
     int ret = -1;
 
@@ -5638,14 +5638,14 @@ static int vboxSnapshotGetReadWriteDisks(virDomainSnapshotDefPtr def,
     for (i = 0; i < mediumAttachments.count && diskCount < def->ndisks; i++) {
         IStorageController *storageController = NULL;
         PRUnichar *storageControllerName = NULL;
-        PRUint32   deviceType     = DeviceType_Null;
-        PRUint32   storageBus     = StorageBus_Null;
-        IMedium   *disk         = NULL;
+        PRUint32 deviceType = DeviceType_Null;
+        PRUint32 storageBus = StorageBus_Null;
+        IMedium *disk = NULL;
         PRUnichar *childLocUtf16 = NULL;
-        char      *childLocUtf8  = NULL;
-        PRUint32   deviceInst     = 0;
-        PRInt32    devicePort     = 0;
-        PRInt32    deviceSlot     = 0;
+        char *childLocUtf8 = NULL;
+        PRUint32 deviceInst = 0;
+        PRInt32 devicePort = 0;
+        PRInt32 deviceSlot = 0;
         vboxArray children = VBOX_ARRAY_INITIALIZER;
         vboxArray snapshotIids = VBOX_ARRAY_INITIALIZER;
         IMediumAttachment *imediumattach = mediumAttachments.items[i];
@@ -5856,14 +5856,14 @@ int vboxSnapshotGetReadOnlyDisks(virDomainSnapshotPtr snapshot,
     /* get the attachment details here */
     for (i = 0; i < mediumAttachments.count && diskCount < def->dom->ndisks; i++) {
         PRUnichar *storageControllerName = NULL;
-        PRUint32   deviceType     = DeviceType_Null;
-        PRUint32   storageBus     = StorageBus_Null;
-        PRBool     readOnly       = PR_FALSE;
+        PRUint32 deviceType = DeviceType_Null;
+        PRUint32 storageBus = StorageBus_Null;
+        PRBool readOnly = PR_FALSE;
         PRUnichar *mediumLocUtf16 = NULL;
-        char      *mediumLocUtf8  = NULL;
-        PRUint32   deviceInst     = 0;
-        PRInt32    devicePort     = 0;
-        PRInt32    deviceSlot     = 0;
+        char *mediumLocUtf8 = NULL;
+        PRUint32 deviceInst = 0;
+        PRInt32 devicePort = 0;
+        PRInt32 deviceSlot = 0;
         IMediumAttachment *imediumattach = mediumAttachments.items[i];
         if (!imediumattach)
             continue;
@@ -7378,7 +7378,7 @@ vboxConnectListAllDomains(virConnectPtr conn,
 {
     vboxGlobalData *data = conn->privateData;
     vboxArray machines = VBOX_ARRAY_INITIALIZER;
-    char      *machineNameUtf8  = NULL;
+    char *machineNameUtf8 = NULL;
     PRUnichar *machineNameUtf16 = NULL;
     unsigned char uuid[VIR_UUID_BUFLEN];
     vboxIIDUnion iid;
@@ -7591,7 +7591,7 @@ vboxDomainHasManagedSaveImage(virDomainPtr dom, unsigned int flags)
     vboxGlobalData *data = dom->conn->privateData;
     vboxArray machines = VBOX_ARRAY_INITIALIZER;
     vboxIIDUnion iid;
-    char *machineNameUtf8  = NULL;
+    char *machineNameUtf8 = NULL;
     PRUnichar *machineNameUtf16 = NULL;
     unsigned char uuid[VIR_UUID_BUFLEN];
     size_t i;
diff --git a/src/vbox/vbox_storage.c b/src/vbox/vbox_storage.c
index 4367009..6584cd0 100644
--- a/src/vbox/vbox_storage.c
+++ b/src/vbox/vbox_storage.c
@@ -515,7 +515,7 @@ static int vboxStorageVolDelete(virStorageVolPtr vol, unsigned int flags)
     PRUint32 hddstate = 0;
     size_t i = 0;
     size_t j = 0;
-    PRUint32  machineIdsSize = 0;
+    PRUint32 machineIdsSize = 0;
     vboxArray machineIds = VBOX_ARRAY_INITIALIZER;
     vboxIIDUnion hddIID;
     int ret = -1;
diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c
index 409ecef..fe58f8c 100644
--- a/src/vbox/vbox_tmpl.c
+++ b/src/vbox/vbox_tmpl.c
@@ -828,8 +828,8 @@ _vboxAttachDrivesOld(virDomainDefPtr def, vboxGlobalData *data, IMachine *machin
 
                 machine->vtbl->GetDVDDrive(machine, &dvdDrive);
                 if (dvdDrive) {
-                    IDVDImage *dvdImage          = NULL;
-                    PRUnichar *dvdfileUtf16      = NULL;
+                    IDVDImage *dvdImage = NULL;
+                    PRUnichar *dvdfileUtf16 = NULL;
                     vboxIID dvduuid = VBOX_IID_INITIALIZER;
                     vboxIID dvdemptyuuid = VBOX_IID_INITIALIZER;
 
@@ -872,10 +872,10 @@ _vboxAttachDrivesOld(virDomainDefPtr def, vboxGlobalData *data, IMachine *machin
             }
         } else if (def->disks[i]->device == VIR_DOMAIN_DISK_DEVICE_DISK) {
             if (type == VIR_STORAGE_TYPE_FILE && src) {
-                IHardDisk *hardDisk     = NULL;
+                IHardDisk *hardDisk = NULL;
                 PRUnichar *hddfileUtf16 = NULL;
                 vboxIID hdduuid = VBOX_IID_INITIALIZER;
-                PRUnichar *hddEmpty     = NULL;
+                PRUnichar *hddEmpty = NULL;
                 /* Current Limitation: Harddisk can't be connected to
                  * Secondary Master as Secondary Master is always used
                  * for CD/DVD Drive, so don't connect the harddisk if it
@@ -929,8 +929,8 @@ _vboxAttachDrivesOld(virDomainDefPtr def, vboxGlobalData *data, IMachine *machin
                                 VIR_DEBUG("Not connecting harddisk to hdc as hdc"
                                        " is taken by CD/DVD Drive");
                             } else {
-                                PRInt32 channel          = 0;
-                                PRInt32 device           = 0;
+                                PRInt32 channel = 0;
+                                PRInt32 device = 0;
                                 PRUnichar *hddcnameUtf16 = NULL;
 
                                 char *hddcname;
@@ -981,8 +981,8 @@ _vboxAttachDrivesOld(virDomainDefPtr def, vboxGlobalData *data, IMachine *machin
                 if (floppyDrive) {
                     rc = floppyDrive->vtbl->SetEnabled(floppyDrive, 1);
                     if (NS_SUCCEEDED(rc)) {
-                        IFloppyImage *floppyImage   = NULL;
-                        PRUnichar *fdfileUtf16      = NULL;
+                        IFloppyImage *floppyImage = NULL;
+                        PRUnichar *fdfileUtf16 = NULL;
                         vboxIID fduuid = VBOX_IID_INITIALIZER;
                         vboxIID fdemptyuuid = VBOX_IID_INITIALIZER;
 
@@ -1109,14 +1109,14 @@ _vboxAttachDrivesOld(virDomainDefPtr def, vboxGlobalData *data, IMachine *machin
                                              ? "True" : "False"));
 
         if (type == VIR_STORAGE_TYPE_FILE && src) {
-            IMedium   *medium          = NULL;
-            PRUnichar *mediumUUID      = NULL;
+            IMedium *medium = NULL;
+            PRUnichar *mediumUUID = NULL;
             PRUnichar *mediumFileUtf16 = NULL;
-            PRUint32   storageBus      = StorageBus_Null;
-            PRUint32   deviceType      = DeviceType_Null;
-            PRInt32    deviceInst      = 0;
-            PRInt32    devicePort      = 0;
-            PRInt32    deviceSlot      = 0;
+            PRUint32 storageBus = StorageBus_Null;
+            PRUint32 deviceType = DeviceType_Null;
+            PRInt32 deviceInst = 0;
+            PRInt32 devicePort = 0;
+            PRInt32 deviceSlot = 0;
 
             VBOX_UTF8_TO_UTF16(src, &mediumFileUtf16);
 
@@ -1405,8 +1405,8 @@ vboxCallbackOnMachineStateChange(IVirtualBoxCallback *pThis ATTRIBUTE_UNUSED,
                                  PRUnichar *machineId, PRUint32 state)
 {
     virDomainPtr dom = NULL;
-    int event        = 0;
-    int detail       = 0;
+    int event = 0;
+    int detail = 0;
 
     vboxDriverLock(g_pVBoxGlobalData);
 
@@ -1414,7 +1414,7 @@ vboxCallbackOnMachineStateChange(IVirtualBoxCallback *pThis ATTRIBUTE_UNUSED,
     DEBUGPRUnichar("machineId", machineId);
 
     if (machineId) {
-        char *machineIdUtf8       = NULL;
+        char *machineIdUtf8 = NULL;
         unsigned char uuid[VIR_UUID_BUFLEN];
 
         g_pVBoxGlobalData->pFuncs->pfnUtf16ToUtf8(machineId, &machineIdUtf8);
@@ -1524,8 +1524,8 @@ vboxCallbackOnMachineRegistered(IVirtualBoxCallback *pThis ATTRIBUTE_UNUSED,
                                 PRUnichar *machineId, PRBool registered)
 {
     virDomainPtr dom = NULL;
-    int event        = 0;
-    int detail       = 0;
+    int event = 0;
+    int detail = 0;
 
     vboxDriverLock(g_pVBoxGlobalData);
 
@@ -1533,7 +1533,7 @@ vboxCallbackOnMachineRegistered(IVirtualBoxCallback *pThis ATTRIBUTE_UNUSED,
     DEBUGPRUnichar("machineId", machineId);
 
     if (machineId) {
-        char *machineIdUtf8       = NULL;
+        char *machineIdUtf8 = NULL;
         unsigned char uuid[VIR_UUID_BUFLEN];
 
         g_pVBoxGlobalData->pFuncs->pfnUtf16ToUtf8(machineId, &machineIdUtf8);
@@ -1749,7 +1749,7 @@ vboxConnectDomainEventRegister(virConnectPtr conn,
                                virFreeCallback freecb)
 {
     vboxGlobalData *data = conn->privateData;
-    int vboxRet          = -1;
+    int vboxRet = -1;
     nsresult rc;
     int ret = -1;
 
@@ -1853,7 +1853,7 @@ static int vboxConnectDomainEventRegisterAny(virConnectPtr conn,
                                              virFreeCallback freecb)
 {
     vboxGlobalData *data = conn->privateData;
-    int vboxRet          = -1;
+    int vboxRet = -1;
     nsresult rc;
     int ret = -1;
 
@@ -2159,12 +2159,12 @@ _dumpIDEHDDsOld(virDomainDefPtr def,
                 vboxGlobalData *data,
                 IMachine *machine)
 {
-    PRInt32       hddNum                = 0;
-    IHardDisk    *hardDiskPM            = NULL;
-    IHardDisk    *hardDiskPS            = NULL;
-    IHardDisk    *hardDiskSS            = NULL;
-    const char   *hddBus                = "IDE";
-    PRUnichar    *hddBusUtf16           = NULL;
+    PRInt32 hddNum = 0;
+    IHardDisk *hardDiskPM = NULL;
+    IHardDisk *hardDiskPS = NULL;
+    IHardDisk *hardDiskSS = NULL;
+    const char *hddBus = "IDE";
+    PRUnichar *hddBusUtf16 = NULL;
 
     /* dump IDE hdds if present */
     VBOX_UTF8_TO_UTF16(hddBus, &hddBusUtf16);
@@ -2198,8 +2198,8 @@ _dumpIDEHDDsOld(virDomainDefPtr def,
 
     if (hardDiskPM) {
         PRUnichar *hddlocationUtf16 = NULL;
-        char *hddlocation           = NULL;
-        PRUint32 hddType            = HardDiskType_Normal;
+        char *hddlocation = NULL;
+        PRUint32 hddType = HardDiskType_Normal;
 
         hardDiskPM->vtbl->imedium.GetLocation((IMedium *)hardDiskPM, &hddlocationUtf16);
         VBOX_UTF16_TO_UTF8(hddlocationUtf16, &hddlocation);
@@ -2220,8 +2220,8 @@ _dumpIDEHDDsOld(virDomainDefPtr def,
 
     if (hardDiskPS) {
         PRUnichar *hddlocationUtf16 = NULL;
-        char *hddlocation           = NULL;
-        PRUint32 hddType            = HardDiskType_Normal;
+        char *hddlocation = NULL;
+        PRUint32 hddType = HardDiskType_Normal;
 
         hardDiskPS->vtbl->imedium.GetLocation((IMedium *)hardDiskPS, &hddlocationUtf16);
         VBOX_UTF16_TO_UTF8(hddlocationUtf16, &hddlocation);
@@ -2242,8 +2242,8 @@ _dumpIDEHDDsOld(virDomainDefPtr def,
 
     if (hardDiskSS) {
         PRUnichar *hddlocationUtf16 = NULL;
-        char *hddlocation           = NULL;
-        PRUint32 hddType            = HardDiskType_Normal;
+        char *hddlocation = NULL;
+        PRUint32 hddType = HardDiskType_Normal;
 
         hardDiskSS->vtbl->imedium.GetLocation((IMedium *)hardDiskSS, &hddlocationUtf16);
         VBOX_UTF16_TO_UTF8(hddlocationUtf16, &hddlocation);
@@ -2268,10 +2268,10 @@ _dumpDVD(virDomainDefPtr def,
          vboxGlobalData *data,
          IMachine *machine)
 {
-    IDVDDrive *dvdDrive      = NULL;
-    IDVDImage *dvdImage      = NULL;
+    IDVDDrive *dvdDrive = NULL;
+    IDVDImage *dvdImage = NULL;
     PRUnichar *locationUtf16 = NULL;
-    char *location           = NULL;
+    char *location = NULL;
 
 
     /* dump CDROM/DVD if the drive is attached and has DVD/CD in it */
@@ -2322,8 +2322,8 @@ _dumpDVD(virDomainDefPtr def,
 static int
 _attachDVD(vboxGlobalData *data, IMachine *machine, const char *src)
 {
-    IDVDDrive *dvdDrive     = NULL;
-    IDVDImage *dvdImage     = NULL;
+    IDVDDrive *dvdDrive = NULL;
+    IDVDImage *dvdImage = NULL;
     PRUnichar *dvdfileUtf16 = NULL;
     vboxIID dvduuid = VBOX_IID_INITIALIZER;
     vboxIID dvdemptyuuid = VBOX_IID_INITIALIZER;
@@ -2409,10 +2409,10 @@ _dumpFloppy(virDomainDefPtr def,
 {
     IFloppyDrive *floppyDrive = NULL;
     IFloppyImage *floppyImage = NULL;
-    PRUnichar *locationUtf16  = NULL;
-    char *location            = NULL;
-    PRBool enabled            = PR_FALSE;
-    PRUint32 state            = DriveState_Null;
+    PRUnichar *locationUtf16 = NULL;
+    char *location = NULL;
+    PRBool enabled = PR_FALSE;
+    PRUint32 state = DriveState_Null;
 
     /* dump Floppy if the drive is attached and has floppy in it */
     machine->vtbl->GetFloppyDrive(machine, &floppyDrive);
@@ -2465,8 +2465,8 @@ static int
 _attachFloppy(vboxGlobalData *data, IMachine *machine, const char *src)
 {
     IFloppyDrive *floppyDrive;
-    IFloppyImage *floppyImage   = NULL;
-    PRUnichar *fdfileUtf16      = NULL;
+    IFloppyImage *floppyImage = NULL;
+    PRUnichar *fdfileUtf16 = NULL;
     vboxIID fduuid = VBOX_IID_INITIALIZER;
     vboxIID fdemptyuuid = VBOX_IID_INITIALIZER;
     nsresult rc;
@@ -2824,7 +2824,7 @@ _virtualboxCreateMachine(vboxGlobalData *data, virDomainDefPtr def, IMachine **m
                                                     iid.value,
                                                     machine);
 #elif VBOX_API_VERSION < 4000000 /* 3002000 <= VBOX_API_VERSION < 4000000 */
-        PRBool override             = PR_FALSE;
+        PRBool override = PR_FALSE;
         rc = data->vboxObj->vtbl->CreateMachine(data->vboxObj,
                                                 machineNameUtf16,
                                                 NULL,
@@ -2833,7 +2833,7 @@ _virtualboxCreateMachine(vboxGlobalData *data, virDomainDefPtr def, IMachine **m
                                                 override,
                                                 machine);
 #elif VBOX_API_VERSION >= 4000000 && VBOX_API_VERSION < 4002000
-        PRBool override             = PR_FALSE;
+        PRBool override = PR_FALSE;
         rc = data->vboxObj->vtbl->CreateMachine(data->vboxObj,
                                                 NULL,
                                                 machineNameUtf16,
-- 
2.4.10

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]