[PATCH 28/30] tools/: Remove spaces after casts

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

 



Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx>
---
 tools/nss/libvirt_nss.c      | 14 +++++++-------
 tools/virsh-domain-monitor.c | 14 +++++++-------
 tools/virsh-domain.c         | 16 ++++++++--------
 tools/virsh-interface.c      | 12 ++++++------
 tools/virsh-network.c        | 10 +++++-----
 tools/virsh-nodedev.c        | 14 +++++++-------
 tools/virsh-nwfilter.c       |  6 +++---
 tools/virsh-pool.c           | 36 ++++++++++++++++++------------------
 tools/virsh-secret.c         |  6 +++---
 tools/virsh-util.c           |  4 ++--
 tools/virsh-volume.c         | 16 ++++++++--------
 tools/virt-admin.c           |  4 ++--
 tools/vsh.c                  | 18 +++++++++---------
 13 files changed, 85 insertions(+), 85 deletions(-)

diff --git a/tools/nss/libvirt_nss.c b/tools/nss/libvirt_nss.c
index 62fe589bed7e..276a1b85f110 100644
--- a/tools/nss/libvirt_nss.c
+++ b/tools/nss/libvirt_nss.c
@@ -116,8 +116,8 @@ appendAddr(leaseAddress **tmpAddress,
     for (i = 0; i < *ntmpAddress; i++) {
         if (memcmp((*tmpAddress)[i].addr,
                    (family == AF_INET ?
-                    (void *) &sa.data.inet4.sin_addr.s_addr :
-                    (void *) &sa.data.inet6.sin6_addr.s6_addr),
+                    (void *)&sa.data.inet4.sin_addr.s_addr :
+                    (void *)&sa.data.inet6.sin6_addr.s6_addr),
                    FAMILY_ADDRESS_SIZE(family)) == 0) {
             DEBUG("IP address already in the list");
             ret = 0;
@@ -133,8 +133,8 @@ appendAddr(leaseAddress **tmpAddress,
     (*tmpAddress)[*ntmpAddress].af = family;
     memcpy((*tmpAddress)[*ntmpAddress].addr,
            (family == AF_INET ?
-            (void *) &sa.data.inet4.sin_addr.s_addr :
-            (void *) &sa.data.inet6.sin6_addr.s6_addr),
+            (void *)&sa.data.inet4.sin_addr.s_addr :
+            (void *)&sa.data.inet6.sin6_addr.s6_addr),
            FAMILY_ADDRESS_SIZE(family));
     (*ntmpAddress)++;
     ret = 0;
@@ -158,7 +158,7 @@ findLeaseInJSON(leaseAddress **tmpAddress,
     time_t currtime;
     int ret = -1;
 
-    if ((currtime = time(NULL)) == (time_t) - 1) {
+    if ((currtime = time(NULL)) == (time_t)- 1) {
         ERROR("Failed to get current system time");
         goto cleanup;
     }
@@ -197,7 +197,7 @@ findLeaseInJSON(leaseAddress **tmpAddress,
         }
 
         /* Do not report expired lease */
-        if (expirytime < (long long) currtime) {
+        if (expirytime < (long long)currtime) {
             DEBUG("Skipping expired lease for %s", name);
             continue;
         }
@@ -323,7 +323,7 @@ findLease(const char *name,
 
     size_t i;
     for (i = 0; i < nMacmaps; i++) {
-        const char **macs = (const char **) virMacMapLookup(macmaps[i], name);
+        const char **macs = (const char **)virMacMapLookup(macmaps[i], name);
 
         if (!macs)
             continue;
diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c
index 8e071779b4ef..e96e05e01732 100644
--- a/tools/virsh-domain-monitor.c
+++ b/tools/virsh-domain-monitor.c
@@ -1370,7 +1370,7 @@ cmdDomTime(vshControl *ctl, const vshCmd *cmd)
     }
 
     if (doSet || now || rtcSync) {
-        if (now && ((seconds = time(NULL)) == (time_t) -1)) {
+        if (now && ((seconds = time(NULL)) == (time_t)-1)) {
             vshError(ctl, _("Unable to get current time"));
             goto cleanup;
         }
@@ -1425,11 +1425,11 @@ static const vshCmdInfo info_list[] = {
 static int
 virshDomainSorter(const void *a, const void *b)
 {
-    virDomainPtr *da = (virDomainPtr *) a;
-    virDomainPtr *db = (virDomainPtr *) b;
+    virDomainPtr *da = (virDomainPtr *)a;
+    virDomainPtr *db = (virDomainPtr *)b;
     unsigned int ida;
     unsigned int idb;
-    unsigned int inactive = (unsigned int) -1;
+    unsigned int inactive = (unsigned int)-1;
 
     if (*da && !*db)
         return -1;
@@ -1541,7 +1541,7 @@ virshDomainListCollect(vshControl *ctl, unsigned int flags)
         }
 
         if (nids) {
-            ids = vshMalloc(ctl, sizeof(int) * nids);
+            ids = vshMalloc(ctl, sizeof(int)* nids);
 
             if ((nids = virConnectListDomains(priv->conn, ids, nids)) < 0) {
                 vshError(ctl, "%s", _("Failed to list active domains"));
@@ -1558,7 +1558,7 @@ virshDomainListCollect(vshControl *ctl, unsigned int flags)
         }
 
         if (nnames) {
-            names = vshMalloc(ctl, sizeof(char *) * nnames);
+            names = vshMalloc(ctl, sizeof(char *)* nnames);
 
             if ((nnames = virConnectListDefinedDomains(priv->conn, names,
                                                       nnames)) < 0) {
@@ -1851,7 +1851,7 @@ cmdList(vshControl *ctl, const vshCmd *cmd)
     for (i = 0; i < list->ndomains; i++) {
         dom = list->domains[i];
         id = virDomainGetID(dom);
-        if (id != (unsigned int) -1)
+        if (id != (unsigned int)-1)
             snprintf(id_buf, sizeof(id_buf), "%d", id);
         else
             ignore_value(virStrcpyStatic(id_buf, "-"));
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 2b775fc4cca6..706623039527 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -2838,7 +2838,7 @@ cmdBlockresize(vshControl *ctl, const vshCmd *cmd)
     unsigned int flags = 0;
     bool ret = false;
 
-    if (vshCommandOptStringReq(ctl, cmd, "path", (const char **) &path) < 0)
+    if (vshCommandOptStringReq(ctl, cmd, "path", (const char **)&path) < 0)
         return false;
 
     if (vshCommandOptScaledInt(ctl, cmd, "size", &size, 1024, ULLONG_MAX) < 0)
@@ -5454,7 +5454,7 @@ cmdScreenshot(vshControl *ctl, const vshCmd *cmd)
     char *mime = NULL;
     virshControlPtr priv = ctl->privData;
 
-    if (vshCommandOptStringReq(ctl, cmd, "file", (const char **) &file) < 0)
+    if (vshCommandOptStringReq(ctl, cmd, "file", (const char **)&file) < 0)
         return false;
 
     if (vshCommandOptUInt(ctl, cmd, "screen", &screen) < 0)
@@ -10826,7 +10826,7 @@ virshMigrateTimeout(vshControl *ctl,
                     virDomainPtr dom,
                     void *opaque)
 {
-    virshMigrateTimeoutAction action = *(virshMigrateTimeoutAction *) opaque;
+    virshMigrateTimeoutAction action = *(virshMigrateTimeoutAction *)opaque;
 
     switch (action) {
     case VIRSH_MIGRATE_TIMEOUT_DEFAULT: /* unreachable */
@@ -11722,8 +11722,8 @@ virshNodeIsSuperset(xmlNodePtr n1, xmlNodePtr n2)
     attr = n2->properties;
     while (attr) {
         if (attr->type == XML_ATTRIBUTE_NODE) {
-            prop1 = virXMLPropString(n1, (const char *) attr->name);
-            prop2 = virXMLPropString(n2, (const char *) attr->name);
+            prop1 = virXMLPropString(n1, (const char *)attr->name);
+            prop2 = virXMLPropString(n2, (const char *)attr->name);
             if (STRNEQ_NULLABLE(prop1, prop2)) {
                 xmlFree(prop1);
                 xmlFree(prop2);
@@ -12705,7 +12705,7 @@ static const char *
 virshDomainEventDetailToString(int event, int detail)
 {
     const char *str = NULL;
-    switch ((virDomainEventType) event) {
+    switch ((virDomainEventType)event) {
     case VIR_DOMAIN_EVENT_DEFINED:
         str = virshDomainEventDefinedTypeToString(detail);
         break;
@@ -12905,7 +12905,7 @@ virshEventGenericPrint(virConnectPtr conn ATTRIBUTE_UNUSED,
     virBuffer buf = VIR_BUFFER_INITIALIZER;
 
     virBufferAsprintf(&buf, _("event '%s' for domain %s\n"),
-                      ((virshDomEventData *) opaque)->cb->name,
+                      ((virshDomEventData *)opaque)->cb->name,
                       virDomainGetName(dom));
     virshEventPrint(opaque, &buf);
 }
@@ -13036,7 +13036,7 @@ virshEventBlockJobPrint(virConnectPtr conn ATTRIBUTE_UNUSED,
     virBuffer buf = VIR_BUFFER_INITIALIZER;
 
     virBufferAsprintf(&buf, _("event '%s' for domain %s: %s for %s %s\n"),
-                      ((virshDomEventData *) opaque)->cb->name,
+                      ((virshDomEventData *)opaque)->cb->name,
                       virDomainGetName(dom),
                       virshDomainBlockJobToString(type),
                       disk,
diff --git a/tools/virsh-interface.c b/tools/virsh-interface.c
index 50518c667be2..7ee683df0e4f 100644
--- a/tools/virsh-interface.c
+++ b/tools/virsh-interface.c
@@ -155,8 +155,8 @@ cmdInterfaceEdit(vshControl *ctl, const vshCmd *cmd)
 static int
 virshInterfaceSorter(const void *a, const void *b)
 {
-    virInterfacePtr *ia = (virInterfacePtr *) a;
-    virInterfacePtr *ib = (virInterfacePtr *) b;
+    virInterfacePtr *ia = (virInterfacePtr *)a;
+    virInterfacePtr *ib = (virInterfacePtr *)b;
 
     if (*ia && !*ib)
         return -1;
@@ -234,7 +234,7 @@ virshInterfaceListCollect(vshControl *ctl,
             goto cleanup;
         }
         if (nActiveIfaces) {
-            activeNames = vshMalloc(ctl, sizeof(char *) * nActiveIfaces);
+            activeNames = vshMalloc(ctl, sizeof(char *)* nActiveIfaces);
 
             if ((nActiveIfaces = virConnectListInterfaces(priv->conn, activeNames,
                                                           nActiveIfaces)) < 0) {
@@ -251,7 +251,7 @@ virshInterfaceListCollect(vshControl *ctl,
             goto cleanup;
         }
         if (nInactiveIfaces) {
-            inactiveNames = vshMalloc(ctl, sizeof(char *) * nInactiveIfaces);
+            inactiveNames = vshMalloc(ctl, sizeof(char *)* nInactiveIfaces);
 
             if ((nInactiveIfaces =
                      virConnectListDefinedInterfaces(priv->conn, inactiveNames,
@@ -965,7 +965,7 @@ cmdInterfaceBridge(vshControl *ctl, const vshCmd *cmd)
     /* br_xml is the new interface to define. It will automatically undefine the
      * independent original interface.
      */
-    if (!(br_handle = virInterfaceDefineXML(priv->conn, (char *) br_xml, 0))) {
+    if (!(br_handle = virInterfaceDefineXML(priv->conn, (char *)br_xml, 0))) {
         vshError(ctl, _("Failed to define new bridge interface %s"),
                  br_name);
         goto cleanup;
@@ -1167,7 +1167,7 @@ cmdInterfaceUnbridge(vshControl *ctl, const vshCmd *cmd)
 
     /* if_xml is the new interface to define.
      */
-    if (!(if_handle = virInterfaceDefineXML(priv->conn, (char *) if_xml, 0))) {
+    if (!(if_handle = virInterfaceDefineXML(priv->conn, (char *)if_xml, 0))) {
         vshError(ctl, _("Failed to define new interface %s"), if_name);
         goto cleanup;
     }
diff --git a/tools/virsh-network.c b/tools/virsh-network.c
index 3f0923bf0ef6..b1809750a05e 100644
--- a/tools/virsh-network.c
+++ b/tools/virsh-network.c
@@ -381,8 +381,8 @@ cmdNetworkInfo(vshControl *ctl, const vshCmd *cmd)
 static int
 virshNetworkSorter(const void *a, const void *b)
 {
-    virNetworkPtr *na = (virNetworkPtr *) a;
-    virNetworkPtr *nb = (virNetworkPtr *) b;
+    virNetworkPtr *na = (virNetworkPtr *)a;
+    virNetworkPtr *nb = (virNetworkPtr *)b;
 
     if (*na && !*nb)
         return -1;
@@ -490,7 +490,7 @@ virshNetworkListCollect(vshControl *ctl,
     if (nAllNets == 0)
          return list;
 
-    names = vshMalloc(ctl, sizeof(char *) * nAllNets);
+    names = vshMalloc(ctl, sizeof(char *)* nAllNets);
 
     /* Retrieve a list of active network names */
     if (!VSH_MATCH(VIR_CONNECT_LIST_NETWORKS_FILTERS_ACTIVE) ||
@@ -1320,8 +1320,8 @@ virshNetworkDHCPLeaseSorter(const void *a, const void *b)
 {
     int rv = -1;
 
-    virNetworkDHCPLeasePtr *lease1 = (virNetworkDHCPLeasePtr *) a;
-    virNetworkDHCPLeasePtr *lease2 = (virNetworkDHCPLeasePtr *) b;
+    virNetworkDHCPLeasePtr *lease1 = (virNetworkDHCPLeasePtr *)a;
+    virNetworkDHCPLeasePtr *lease2 = (virNetworkDHCPLeasePtr *)b;
 
     if (*lease1 && !*lease2)
         return -1;
diff --git a/tools/virsh-nodedev.c b/tools/virsh-nodedev.c
index d25fe0e09b44..8a1445bee7ae 100644
--- a/tools/virsh-nodedev.c
+++ b/tools/virsh-nodedev.c
@@ -180,8 +180,8 @@ virshNodeListLookup(int devid, bool parent, void *opaque)
 static int
 virshNodeDeviceSorter(const void *a, const void *b)
 {
-    virNodeDevicePtr *na = (virNodeDevicePtr *) a;
-    virNodeDevicePtr *nb = (virNodeDevicePtr *) b;
+    virNodeDevicePtr *na = (virNodeDevicePtr *)a;
+    virNodeDevicePtr *nb = (virNodeDevicePtr *)b;
 
     if (*na && !*nb)
         return -1;
@@ -260,7 +260,7 @@ virshNodeDeviceListCollect(vshControl *ctl,
     if (ndevices == 0)
         return list;
 
-    names = vshMalloc(ctl, sizeof(char *) * ndevices);
+    names = vshMalloc(ctl, sizeof(char *)* ndevices);
 
     ndevices = virNodeListDevices(priv->conn, NULL, names, ndevices, 0);
     if (ndevices < 0) {
@@ -298,7 +298,7 @@ virshNodeDeviceListCollect(vshControl *ctl,
             goto cleanup;
         }
 
-        caps = vshMalloc(ctl, sizeof(char *) * ncaps);
+        caps = vshMalloc(ctl, sizeof(char *)* ncaps);
 
         if ((ncaps = virNodeDeviceListCaps(device, caps, ncaps)) < 0) {
             vshError(ctl, "%s", _("Failed to get capability names of the device"));
@@ -415,7 +415,7 @@ cmdNodeListDevices(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
             goto cleanup;
         }
 
-        switch ((virNodeDevCapType) cap_type) {
+        switch ((virNodeDevCapType)cap_type) {
         case VIR_NODE_DEV_CAP_SYSTEM:
             flags |= VIR_CONNECT_LIST_NODE_DEVICES_CAP_SYSTEM;
             break;
@@ -475,8 +475,8 @@ cmdNodeListDevices(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
     }
 
     if (tree) {
-        char **parents = vshMalloc(ctl, sizeof(char *) * list->ndevices);
-        char **names = vshMalloc(ctl, sizeof(char *) * list->ndevices);
+        char **parents = vshMalloc(ctl, sizeof(char *)* list->ndevices);
+        char **names = vshMalloc(ctl, sizeof(char *)* list->ndevices);
         struct virshNodeList arrays = { names, parents };
 
         for (i = 0; i < list->ndevices; i++)
diff --git a/tools/virsh-nwfilter.c b/tools/virsh-nwfilter.c
index 06a002dffdbf..7e75bed849e8 100644
--- a/tools/virsh-nwfilter.c
+++ b/tools/virsh-nwfilter.c
@@ -211,8 +211,8 @@ cmdNWFilterDumpXML(vshControl *ctl, const vshCmd *cmd)
 static int
 virshNWFilterSorter(const void *a, const void *b)
 {
-    virNWFilterPtr *fa = (virNWFilterPtr *) a;
-    virNWFilterPtr *fb = (virNWFilterPtr *) b;
+    virNWFilterPtr *fa = (virNWFilterPtr *)a;
+    virNWFilterPtr *fb = (virNWFilterPtr *)b;
 
     if (*fa && !*fb)
         return -1;
@@ -291,7 +291,7 @@ virshNWFilterListCollect(vshControl *ctl,
     if (nfilters == 0)
         return list;
 
-    names = vshMalloc(ctl, sizeof(char *) * nfilters);
+    names = vshMalloc(ctl, sizeof(char *)* nfilters);
 
     nfilters = virConnectListNWFilters(priv->conn, names, nfilters);
     if (nfilters < 0) {
diff --git a/tools/virsh-pool.c b/tools/virsh-pool.c
index 36bf8d9faacb..0a4869a72c6b 100644
--- a/tools/virsh-pool.c
+++ b/tools/virsh-pool.c
@@ -810,8 +810,8 @@ cmdPoolDumpXML(vshControl *ctl, const vshCmd *cmd)
 static int
 virshStoragePoolSorter(const void *a, const void *b)
 {
-    virStoragePoolPtr *pa = (virStoragePoolPtr *) a;
-    virStoragePoolPtr *pb = (virStoragePoolPtr *) b;
+    virStoragePoolPtr *pa = (virStoragePoolPtr *)a;
+    virStoragePoolPtr *pb = (virStoragePoolPtr *)b;
 
     if (*pa && !*pb)
         return -1;
@@ -925,7 +925,7 @@ virshStoragePoolListCollect(vshControl *ctl,
     if (nAllPools == 0)
         return list;
 
-    names = vshMalloc(ctl, sizeof(char *) * nAllPools);
+    names = vshMalloc(ctl, sizeof(char *)* nAllPools);
 
     /* Retrieve a list of active storage pool names */
     if (!VSH_MATCH(VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_ACTIVE) ||
@@ -1184,7 +1184,7 @@ cmdPoolList(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
                 return false;
             }
 
-            switch ((virStoragePoolType) poolType) {
+            switch ((virStoragePoolType)poolType) {
             case VIR_STORAGE_POOL_DIR:
                 flags |= VIR_CONNECT_LIST_STORAGE_POOLS_DIR;
                 break;
@@ -1430,32 +1430,32 @@ cmdPoolList(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
 
     /* Display the string lengths for debugging. */
     vshDebug(ctl, VSH_ERR_DEBUG, "Longest name string = %lu chars\n",
-             (unsigned long) nameStrLength);
+             (unsigned long)nameStrLength);
     vshDebug(ctl, VSH_ERR_DEBUG, "Longest state string = %lu chars\n",
-             (unsigned long) stateStrLength);
+             (unsigned long)stateStrLength);
     vshDebug(ctl, VSH_ERR_DEBUG, "Longest autostart string = %lu chars\n",
-             (unsigned long) autostartStrLength);
+             (unsigned long)autostartStrLength);
     vshDebug(ctl, VSH_ERR_DEBUG, "Longest persistent string = %lu chars\n",
-             (unsigned long) persistStrLength);
+             (unsigned long)persistStrLength);
     vshDebug(ctl, VSH_ERR_DEBUG, "Longest capacity string = %lu chars\n",
-             (unsigned long) capStrLength);
+             (unsigned long)capStrLength);
     vshDebug(ctl, VSH_ERR_DEBUG, "Longest allocation string = %lu chars\n",
-             (unsigned long) allocStrLength);
+             (unsigned long)allocStrLength);
     vshDebug(ctl, VSH_ERR_DEBUG, "Longest available string = %lu chars\n",
-             (unsigned long) availStrLength);
+             (unsigned long)availStrLength);
 
     /* Create the output template.  Each column is sized according to
      * the longest string.
      */
     if (virAsprintf(&outputStr,
                     " %%-%lus  %%-%lus  %%-%lus  %%-%lus  %%%lus  %%%lus  %%%lus\n",
-                    (unsigned long) nameStrLength,
-                    (unsigned long) stateStrLength,
-                    (unsigned long) autostartStrLength,
-                    (unsigned long) persistStrLength,
-                    (unsigned long) capStrLength,
-                    (unsigned long) allocStrLength,
-                    (unsigned long) availStrLength) < 0)
+                    (unsigned long)nameStrLength,
+                    (unsigned long)stateStrLength,
+                    (unsigned long)autostartStrLength,
+                    (unsigned long)persistStrLength,
+                    (unsigned long)capStrLength,
+                    (unsigned long)allocStrLength,
+                    (unsigned long)availStrLength) < 0)
         goto cleanup;
 
     /* Display the header */
diff --git a/tools/virsh-secret.c b/tools/virsh-secret.c
index 9e4ec61a8807..55b35f5b9bce 100644
--- a/tools/virsh-secret.c
+++ b/tools/virsh-secret.c
@@ -332,8 +332,8 @@ cmdSecretUndefine(vshControl *ctl, const vshCmd *cmd)
 static int
 virshSecretSorter(const void *a, const void *b)
 {
-    virSecretPtr *sa = (virSecretPtr *) a;
-    virSecretPtr *sb = (virSecretPtr *) b;
+    virSecretPtr *sa = (virSecretPtr *)a;
+    virSecretPtr *sb = (virSecretPtr *)b;
     char uuid_sa[VIR_UUID_STRING_BUFLEN];
     char uuid_sb[VIR_UUID_STRING_BUFLEN];
 
@@ -419,7 +419,7 @@ virshSecretListCollect(vshControl *ctl,
     if (nsecrets == 0)
         return list;
 
-    uuids = vshMalloc(ctl, sizeof(char *) * nsecrets);
+    uuids = vshMalloc(ctl, sizeof(char *)* nsecrets);
 
     nsecrets = virConnectListSecrets(priv->conn, uuids, nsecrets);
     if (nsecrets < 0) {
diff --git a/tools/virsh-util.c b/tools/virsh-util.c
index 44be3ad64b1f..a1bcab5de3f5 100644
--- a/tools/virsh-util.c
+++ b/tools/virsh-util.c
@@ -175,7 +175,7 @@ virshStreamSourceSkip(virStreamPtr st ATTRIBUTE_UNUSED,
     int fd = cbData->fd;
     off_t cur;
 
-    if ((cur = lseek(fd, offset, SEEK_CUR)) == (off_t) -1)
+    if ((cur = lseek(fd, offset, SEEK_CUR)) == (off_t)-1)
         return -1;
 
     return 0;
@@ -190,7 +190,7 @@ virshStreamSkip(virStreamPtr st ATTRIBUTE_UNUSED,
     int *fd = opaque;
     off_t cur;
 
-    if ((cur = lseek(*fd, offset, SEEK_CUR)) == (off_t) -1)
+    if ((cur = lseek(*fd, offset, SEEK_CUR)) == (off_t)-1)
         return -1;
 
     if (ftruncate(*fd, cur) < 0)
diff --git a/tools/virsh-volume.c b/tools/virsh-volume.c
index 9d6ebd2325a5..0bfc7c344b1e 100644
--- a/tools/virsh-volume.c
+++ b/tools/virsh-volume.c
@@ -617,7 +617,7 @@ cmdVolClone(vshControl *ctl, const vshCmd *cmd)
         goto cleanup;
     }
 
-    newvol = virStorageVolCreateXMLFrom(origpool, (char *) newxml, origvol, flags);
+    newvol = virStorageVolCreateXMLFrom(origpool, (char *)newxml, origvol, flags);
 
     if (newvol != NULL) {
         vshPrintExtra(ctl, _("Vol %s cloned from %s\n"),
@@ -1235,8 +1235,8 @@ cmdVolDumpXML(vshControl *ctl, const vshCmd *cmd)
 static int
 virshStorageVolSorter(const void *a, const void *b)
 {
-    virStorageVolPtr *va = (virStorageVolPtr *) a;
-    virStorageVolPtr *vb = (virStorageVolPtr *) b;
+    virStorageVolPtr *va = (virStorageVolPtr *)a;
+    virStorageVolPtr *vb = (virStorageVolPtr *)b;
 
     if (*va && !*vb)
         return -1;
@@ -1542,11 +1542,11 @@ cmdVolList(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
 
     if (virAsprintf(&outputStr,
                     " %%-%lus  %%-%lus  %%-%lus  %%%lus  %%%lus\n",
-                    (unsigned long) nameStrLength,
-                    (unsigned long) pathStrLength,
-                    (unsigned long) typeStrLength,
-                    (unsigned long) capStrLength,
-                    (unsigned long) allocStrLength) < 0)
+                    (unsigned long)nameStrLength,
+                    (unsigned long)pathStrLength,
+                    (unsigned long)typeStrLength,
+                    (unsigned long)capStrLength,
+                    (unsigned long)allocStrLength) < 0)
         goto cleanup;
 
     /* Display the header */
diff --git a/tools/virt-admin.c b/tools/virt-admin.c
index c86b5763a73c..efc4f7a940da 100644
--- a/tools/virt-admin.c
+++ b/tools/virt-admin.c
@@ -1014,7 +1014,7 @@ cmdDaemonLogFilters(vshControl *ctl, const vshCmd *cmd)
 
     if (vshCommandOptBool(cmd, "filters")) {
         if ((vshCommandOptStringReq(ctl, cmd, "filters",
-                                    (const char **) &filters) < 0 ||
+                                    (const char **)&filters) < 0 ||
              virAdmConnectSetLoggingFilters(priv->conn, filters, 0) < 0)) {
             vshError(ctl, _("Unable to change daemon logging settings"));
             return false;
@@ -1068,7 +1068,7 @@ cmdDaemonLogOutputs(vshControl *ctl, const vshCmd *cmd)
 
     if (vshCommandOptBool(cmd, "outputs")) {
         if ((vshCommandOptStringReq(ctl, cmd, "outputs",
-                                    (const char **) &outputs) < 0 ||
+                                    (const char **)&outputs) < 0 ||
              virAdmConnectSetLoggingOutputs(priv->conn, outputs, 0) < 0)) {
             vshError(ctl, _("Unable to change daemon logging settings"));
             return false;
diff --git a/tools/vsh.c b/tools/vsh.c
index 73ec007e5622..ae4cd6ae48f7 100644
--- a/tools/vsh.c
+++ b/tools/vsh.c
@@ -136,7 +136,7 @@ _vshMalloc(vshControl *ctl, size_t size, const char *filename, int line)
     if (VIR_ALLOC_N(x, size) == 0)
         return x;
     vshError(ctl, _("%s: %d: failed to allocate %d bytes"),
-             filename, line, (int) size);
+             filename, line, (int)size);
     exit(EXIT_FAILURE);
 }
 
@@ -150,7 +150,7 @@ _vshCalloc(vshControl *ctl, size_t nmemb, size_t size, const char *filename,
         VIR_ALLOC_N(x, nmemb * size) == 0)
         return x;
     vshError(ctl, _("%s: %d: failed to allocate %d bytes"),
-             filename, line, (int) (size*nmemb));
+             filename, line, (int)(size*nmemb));
     exit(EXIT_FAILURE);
 }
 
@@ -1759,7 +1759,7 @@ vshCommandOptTimeoutToMs(vshControl *ctl, const vshCmd *cmd, int *timeout)
                  "timeout");
         ret = -1;
     } else {
-        *timeout = ((int) utimeout) * 1000;
+        *timeout = ((int)utimeout) * 1000;
     }
 
     return ret;
@@ -2232,7 +2232,7 @@ vshOutputLogFile(vshControl *ctl, int log_level, const char *msg_format,
                       stTm.tm_min,
                       stTm.tm_sec,
                       ctl->progname,
-                      (int) getpid());
+                      (int)getpid());
     switch (log_level) {
         case VSH_ERR_DEBUG:
             lvl = LVL_DEBUG;
@@ -2754,7 +2754,7 @@ vshCompleterFilter(char ***list,
     if (!list || !*list)
         return -1;
 
-    list_len = virStringListLength((const char **) *list);
+    list_len = virStringListLength((const char **)*list);
 
     if (VIR_ALLOC_N(newList, list_len + 1) < 0)
         return -1;
@@ -2916,7 +2916,7 @@ vshReadlineInit(vshControl *ctl)
 # if defined(RL_READLINE_VERSION) && RL_READLINE_VERSION > 0x0402
     rl_readline_name = ctl->name;
 # else
-    rl_readline_name = (char *) ctl->name;
+    rl_readline_name = (char *)ctl->name;
 # endif
 
     /* Tell the completer that we want a crack first. */
@@ -2925,15 +2925,15 @@ vshReadlineInit(vshControl *ctl)
 # if defined(RL_READLINE_VERSION) && RL_READLINE_VERSION > 0x0402
     rl_basic_word_break_characters = break_characters;
 # else
-    rl_basic_word_break_characters = (char *) break_characters;
+    rl_basic_word_break_characters = (char *)break_characters;
 # endif
 
 # if defined(RL_READLINE_VERSION) && RL_READLINE_VERSION > 0x0402
     rl_completer_quote_characters = quote_characters;
     rl_char_is_quoted_p = vshReadlineCharIsQuoted;
 # else
-    rl_completer_quote_characters = (char *) quote_characters;
-    rl_char_is_quoted_p = (Function *) vshReadlineCharIsQuoted;
+    rl_completer_quote_characters = (char *)quote_characters;
+    rl_char_is_quoted_p = (Function *)vshReadlineCharIsQuoted;
 # endif
 
     if (virAsprintf(&histsize_env, "%s_HISTSIZE", ctl->env_prefix) < 0)
-- 
2.17.0

--
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]

  Powered by Linux