From nobody Sun Feb 8 13:33:10 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1524662821456747.9709726669312; Wed, 25 Apr 2018 06:27:01 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A2347804EB; Wed, 25 Apr 2018 13:26:59 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4060B7A25E; Wed, 25 Apr 2018 13:26:59 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 58971180BAD3; Wed, 25 Apr 2018 13:26:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3PDPEbK002273 for ; Wed, 25 Apr 2018 09:25:14 -0400 Received: by smtp.corp.redhat.com (Postfix) id F2ED02166BC6; Wed, 25 Apr 2018 13:25:13 +0000 (UTC) Received: from caroline.localdomain (unknown [10.43.2.67]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 701C9215CDCF for ; Wed, 25 Apr 2018 13:25:13 +0000 (UTC) Received: from caroline.brq.redhat.com (caroline.usersys.redhat.com [127.0.0.1]) by caroline.localdomain (Postfix) with ESMTP id 193A4120095 for ; Wed, 25 Apr 2018 15:25:10 +0200 (CEST) From: Martin Kletzander To: libvir-list@redhat.com Date: Wed, 25 Apr 2018 15:25:05 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 28/30] tools/: Remove spaces after casts X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 25 Apr 2018 13:27:00 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Martin Kletzander --- 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 =3D 0; i < *ntmpAddress; i++) { if (memcmp((*tmpAddress)[i].addr, (family =3D=3D 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)) =3D=3D 0) { DEBUG("IP address already in the list"); ret =3D 0; @@ -133,8 +133,8 @@ appendAddr(leaseAddress **tmpAddress, (*tmpAddress)[*ntmpAddress].af =3D family; memcpy((*tmpAddress)[*ntmpAddress].addr, (family =3D=3D 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 =3D 0; @@ -158,7 +158,7 @@ findLeaseInJSON(leaseAddress **tmpAddress, time_t currtime; int ret =3D -1; =20 - if ((currtime =3D time(NULL)) =3D=3D (time_t) - 1) { + if ((currtime =3D time(NULL)) =3D=3D (time_t)- 1) { ERROR("Failed to get current system time"); goto cleanup; } @@ -197,7 +197,7 @@ findLeaseInJSON(leaseAddress **tmpAddress, } =20 /* 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, =20 size_t i; for (i =3D 0; i < nMacmaps; i++) { - const char **macs =3D (const char **) virMacMapLookup(macmaps[i], = name); + const char **macs =3D (const char **)virMacMapLookup(macmaps[i], n= ame); =20 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) } =20 if (doSet || now || rtcSync) { - if (now && ((seconds =3D time(NULL)) =3D=3D (time_t) -1)) { + if (now && ((seconds =3D time(NULL)) =3D=3D (time_t)-1)) { vshError(ctl, _("Unable to get current time")); goto cleanup; } @@ -1425,11 +1425,11 @@ static const vshCmdInfo info_list[] =3D { static int virshDomainSorter(const void *a, const void *b) { - virDomainPtr *da =3D (virDomainPtr *) a; - virDomainPtr *db =3D (virDomainPtr *) b; + virDomainPtr *da =3D (virDomainPtr *)a; + virDomainPtr *db =3D (virDomainPtr *)b; unsigned int ida; unsigned int idb; - unsigned int inactive =3D (unsigned int) -1; + unsigned int inactive =3D (unsigned int)-1; =20 if (*da && !*db) return -1; @@ -1541,7 +1541,7 @@ virshDomainListCollect(vshControl *ctl, unsigned int = flags) } =20 if (nids) { - ids =3D vshMalloc(ctl, sizeof(int) * nids); + ids =3D vshMalloc(ctl, sizeof(int)* nids); =20 if ((nids =3D virConnectListDomains(priv->conn, ids, nids)) < = 0) { vshError(ctl, "%s", _("Failed to list active domains")); @@ -1558,7 +1558,7 @@ virshDomainListCollect(vshControl *ctl, unsigned int = flags) } =20 if (nnames) { - names =3D vshMalloc(ctl, sizeof(char *) * nnames); + names =3D vshMalloc(ctl, sizeof(char *)* nnames); =20 if ((nnames =3D virConnectListDefinedDomains(priv->conn, names, nnames)) < 0) { @@ -1851,7 +1851,7 @@ cmdList(vshControl *ctl, const vshCmd *cmd) for (i =3D 0; i < list->ndomains; i++) { dom =3D list->domains[i]; id =3D virDomainGetID(dom); - if (id !=3D (unsigned int) -1) + if (id !=3D (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 =3D 0; bool ret =3D false; =20 - if (vshCommandOptStringReq(ctl, cmd, "path", (const char **) &path) < = 0) + if (vshCommandOptStringReq(ctl, cmd, "path", (const char **)&path) < 0) return false; =20 if (vshCommandOptScaledInt(ctl, cmd, "size", &size, 1024, ULLONG_MAX) = < 0) @@ -5454,7 +5454,7 @@ cmdScreenshot(vshControl *ctl, const vshCmd *cmd) char *mime =3D NULL; virshControlPtr priv =3D ctl->privData; =20 - if (vshCommandOptStringReq(ctl, cmd, "file", (const char **) &file) < = 0) + if (vshCommandOptStringReq(ctl, cmd, "file", (const char **)&file) < 0) return false; =20 if (vshCommandOptUInt(ctl, cmd, "screen", &screen) < 0) @@ -10826,7 +10826,7 @@ virshMigrateTimeout(vshControl *ctl, virDomainPtr dom, void *opaque) { - virshMigrateTimeoutAction action =3D *(virshMigrateTimeoutAction *) op= aque; + virshMigrateTimeoutAction action =3D *(virshMigrateTimeoutAction *)opa= que; =20 switch (action) { case VIRSH_MIGRATE_TIMEOUT_DEFAULT: /* unreachable */ @@ -11722,8 +11722,8 @@ virshNodeIsSuperset(xmlNodePtr n1, xmlNodePtr n2) attr =3D n2->properties; while (attr) { if (attr->type =3D=3D XML_ATTRIBUTE_NODE) { - prop1 =3D virXMLPropString(n1, (const char *) attr->name); - prop2 =3D virXMLPropString(n2, (const char *) attr->name); + prop1 =3D virXMLPropString(n1, (const char *)attr->name); + prop2 =3D 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 =3D NULL; - switch ((virDomainEventType) event) { + switch ((virDomainEventType)event) { case VIR_DOMAIN_EVENT_DEFINED: str =3D virshDomainEventDefinedTypeToString(detail); break; @@ -12905,7 +12905,7 @@ virshEventGenericPrint(virConnectPtr conn ATTRIBUTE= _UNUSED, virBuffer buf =3D VIR_BUFFER_INITIALIZER; =20 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 ATTRIBUT= E_UNUSED, virBuffer buf =3D VIR_BUFFER_INITIALIZER; =20 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 =3D (virInterfacePtr *) a; - virInterfacePtr *ib =3D (virInterfacePtr *) b; + virInterfacePtr *ia =3D (virInterfacePtr *)a; + virInterfacePtr *ib =3D (virInterfacePtr *)b; =20 if (*ia && !*ib) return -1; @@ -234,7 +234,7 @@ virshInterfaceListCollect(vshControl *ctl, goto cleanup; } if (nActiveIfaces) { - activeNames =3D vshMalloc(ctl, sizeof(char *) * nActiveIfaces); + activeNames =3D vshMalloc(ctl, sizeof(char *)* nActiveIfaces); =20 if ((nActiveIfaces =3D virConnectListInterfaces(priv->conn, ac= tiveNames, nActiveIfaces)) = < 0) { @@ -251,7 +251,7 @@ virshInterfaceListCollect(vshControl *ctl, goto cleanup; } if (nInactiveIfaces) { - inactiveNames =3D vshMalloc(ctl, sizeof(char *) * nInactiveIfa= ces); + inactiveNames =3D vshMalloc(ctl, sizeof(char *)* nInactiveIfac= es); =20 if ((nInactiveIfaces =3D virConnectListDefinedInterfaces(priv->conn, inactiveN= ames, @@ -965,7 +965,7 @@ cmdInterfaceBridge(vshControl *ctl, const vshCmd *cmd) /* br_xml is the new interface to define. It will automatically undefi= ne the * independent original interface. */ - if (!(br_handle =3D virInterfaceDefineXML(priv->conn, (char *) br_xml,= 0))) { + if (!(br_handle =3D 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 *c= md) =20 /* if_xml is the new interface to define. */ - if (!(if_handle =3D virInterfaceDefineXML(priv->conn, (char *) if_xml,= 0))) { + if (!(if_handle =3D 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 =3D (virNetworkPtr *) a; - virNetworkPtr *nb =3D (virNetworkPtr *) b; + virNetworkPtr *na =3D (virNetworkPtr *)a; + virNetworkPtr *nb =3D (virNetworkPtr *)b; =20 if (*na && !*nb) return -1; @@ -490,7 +490,7 @@ virshNetworkListCollect(vshControl *ctl, if (nAllNets =3D=3D 0) return list; =20 - names =3D vshMalloc(ctl, sizeof(char *) * nAllNets); + names =3D vshMalloc(ctl, sizeof(char *)* nAllNets); =20 /* 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 =3D -1; =20 - virNetworkDHCPLeasePtr *lease1 =3D (virNetworkDHCPLeasePtr *) a; - virNetworkDHCPLeasePtr *lease2 =3D (virNetworkDHCPLeasePtr *) b; + virNetworkDHCPLeasePtr *lease1 =3D (virNetworkDHCPLeasePtr *)a; + virNetworkDHCPLeasePtr *lease2 =3D (virNetworkDHCPLeasePtr *)b; =20 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 *opaqu= e) static int virshNodeDeviceSorter(const void *a, const void *b) { - virNodeDevicePtr *na =3D (virNodeDevicePtr *) a; - virNodeDevicePtr *nb =3D (virNodeDevicePtr *) b; + virNodeDevicePtr *na =3D (virNodeDevicePtr *)a; + virNodeDevicePtr *nb =3D (virNodeDevicePtr *)b; =20 if (*na && !*nb) return -1; @@ -260,7 +260,7 @@ virshNodeDeviceListCollect(vshControl *ctl, if (ndevices =3D=3D 0) return list; =20 - names =3D vshMalloc(ctl, sizeof(char *) * ndevices); + names =3D vshMalloc(ctl, sizeof(char *)* ndevices); =20 ndevices =3D virNodeListDevices(priv->conn, NULL, names, ndevices, 0); if (ndevices < 0) { @@ -298,7 +298,7 @@ virshNodeDeviceListCollect(vshControl *ctl, goto cleanup; } =20 - caps =3D vshMalloc(ctl, sizeof(char *) * ncaps); + caps =3D vshMalloc(ctl, sizeof(char *)* ncaps); =20 if ((ncaps =3D virNodeDeviceListCaps(device, caps, ncaps)) < 0) { vshError(ctl, "%s", _("Failed to get capability names of the d= evice")); @@ -415,7 +415,7 @@ cmdNodeListDevices(vshControl *ctl, const vshCmd *cmd A= TTRIBUTE_UNUSED) goto cleanup; } =20 - switch ((virNodeDevCapType) cap_type) { + switch ((virNodeDevCapType)cap_type) { case VIR_NODE_DEV_CAP_SYSTEM: flags |=3D VIR_CONNECT_LIST_NODE_DEVICES_CAP_SYSTEM; break; @@ -475,8 +475,8 @@ cmdNodeListDevices(vshControl *ctl, const vshCmd *cmd A= TTRIBUTE_UNUSED) } =20 if (tree) { - char **parents =3D vshMalloc(ctl, sizeof(char *) * list->ndevices); - char **names =3D vshMalloc(ctl, sizeof(char *) * list->ndevices); + char **parents =3D vshMalloc(ctl, sizeof(char *)* list->ndevices); + char **names =3D vshMalloc(ctl, sizeof(char *)* list->ndevices); struct virshNodeList arrays =3D { names, parents }; =20 for (i =3D 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 =3D (virNWFilterPtr *) a; - virNWFilterPtr *fb =3D (virNWFilterPtr *) b; + virNWFilterPtr *fa =3D (virNWFilterPtr *)a; + virNWFilterPtr *fb =3D (virNWFilterPtr *)b; =20 if (*fa && !*fb) return -1; @@ -291,7 +291,7 @@ virshNWFilterListCollect(vshControl *ctl, if (nfilters =3D=3D 0) return list; =20 - names =3D vshMalloc(ctl, sizeof(char *) * nfilters); + names =3D vshMalloc(ctl, sizeof(char *)* nfilters); =20 nfilters =3D 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 =3D (virStoragePoolPtr *) a; - virStoragePoolPtr *pb =3D (virStoragePoolPtr *) b; + virStoragePoolPtr *pa =3D (virStoragePoolPtr *)a; + virStoragePoolPtr *pb =3D (virStoragePoolPtr *)b; =20 if (*pa && !*pb) return -1; @@ -925,7 +925,7 @@ virshStoragePoolListCollect(vshControl *ctl, if (nAllPools =3D=3D 0) return list; =20 - names =3D vshMalloc(ctl, sizeof(char *) * nAllPools); + names =3D vshMalloc(ctl, sizeof(char *)* nAllPools); =20 /* 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 ATTRIB= UTE_UNUSED) return false; } =20 - switch ((virStoragePoolType) poolType) { + switch ((virStoragePoolType)poolType) { case VIR_STORAGE_POOL_DIR: flags |=3D VIR_CONNECT_LIST_STORAGE_POOLS_DIR; break; @@ -1430,32 +1430,32 @@ cmdPoolList(vshControl *ctl, const vshCmd *cmd ATTR= IBUTE_UNUSED) =20 /* Display the string lengths for debugging. */ vshDebug(ctl, VSH_ERR_DEBUG, "Longest name string =3D %lu chars\n", - (unsigned long) nameStrLength); + (unsigned long)nameStrLength); vshDebug(ctl, VSH_ERR_DEBUG, "Longest state string =3D %lu chars\n", - (unsigned long) stateStrLength); + (unsigned long)stateStrLength); vshDebug(ctl, VSH_ERR_DEBUG, "Longest autostart string =3D %lu chars\n= ", - (unsigned long) autostartStrLength); + (unsigned long)autostartStrLength); vshDebug(ctl, VSH_ERR_DEBUG, "Longest persistent string =3D %lu chars\= n", - (unsigned long) persistStrLength); + (unsigned long)persistStrLength); vshDebug(ctl, VSH_ERR_DEBUG, "Longest capacity string =3D %lu chars\n", - (unsigned long) capStrLength); + (unsigned long)capStrLength); vshDebug(ctl, VSH_ERR_DEBUG, "Longest allocation string =3D %lu chars\= n", - (unsigned long) allocStrLength); + (unsigned long)allocStrLength); vshDebug(ctl, VSH_ERR_DEBUG, "Longest available string =3D %lu chars\n= ", - (unsigned long) availStrLength); + (unsigned long)availStrLength); =20 /* 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; =20 /* 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 =3D (virSecretPtr *) a; - virSecretPtr *sb =3D (virSecretPtr *) b; + virSecretPtr *sa =3D (virSecretPtr *)a; + virSecretPtr *sb =3D (virSecretPtr *)b; char uuid_sa[VIR_UUID_STRING_BUFLEN]; char uuid_sb[VIR_UUID_STRING_BUFLEN]; =20 @@ -419,7 +419,7 @@ virshSecretListCollect(vshControl *ctl, if (nsecrets =3D=3D 0) return list; =20 - uuids =3D vshMalloc(ctl, sizeof(char *) * nsecrets); + uuids =3D vshMalloc(ctl, sizeof(char *)* nsecrets); =20 nsecrets =3D 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 =3D cbData->fd; off_t cur; =20 - if ((cur =3D lseek(fd, offset, SEEK_CUR)) =3D=3D (off_t) -1) + if ((cur =3D lseek(fd, offset, SEEK_CUR)) =3D=3D (off_t)-1) return -1; =20 return 0; @@ -190,7 +190,7 @@ virshStreamSkip(virStreamPtr st ATTRIBUTE_UNUSED, int *fd =3D opaque; off_t cur; =20 - if ((cur =3D lseek(*fd, offset, SEEK_CUR)) =3D=3D (off_t) -1) + if ((cur =3D lseek(*fd, offset, SEEK_CUR)) =3D=3D (off_t)-1) return -1; =20 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; } =20 - newvol =3D virStorageVolCreateXMLFrom(origpool, (char *) newxml, origv= ol, flags); + newvol =3D virStorageVolCreateXMLFrom(origpool, (char *)newxml, origvo= l, flags); =20 if (newvol !=3D 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 =3D (virStorageVolPtr *) a; - virStorageVolPtr *vb =3D (virStorageVolPtr *) b; + virStorageVolPtr *va =3D (virStorageVolPtr *)a; + virStorageVolPtr *vb =3D (virStorageVolPtr *)b; =20 if (*va && !*vb) return -1; @@ -1542,11 +1542,11 @@ cmdVolList(vshControl *ctl, const vshCmd *cmd ATTRI= BUTE_UNUSED) =20 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; =20 /* 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 *cm= d) =20 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 *cm= d) =20 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 *fi= lename, int line) if (VIR_ALLOC_N(x, size) =3D=3D 0) return x; vshError(ctl, _("%s: %d: failed to allocate %d bytes"), - filename, line, (int) size); + filename, line, (int)size); exit(EXIT_FAILURE); } =20 @@ -150,7 +150,7 @@ _vshCalloc(vshControl *ctl, size_t nmemb, size_t size, = const char *filename, VIR_ALLOC_N(x, nmemb * size) =3D=3D 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); } =20 @@ -1759,7 +1759,7 @@ vshCommandOptTimeoutToMs(vshControl *ctl, const vshCm= d *cmd, int *timeout) "timeout"); ret =3D -1; } else { - *timeout =3D ((int) utimeout) * 1000; + *timeout =3D ((int)utimeout) * 1000; } =20 return ret; @@ -2232,7 +2232,7 @@ vshOutputLogFile(vshControl *ctl, int log_level, cons= t char *msg_format, stTm.tm_min, stTm.tm_sec, ctl->progname, - (int) getpid()); + (int)getpid()); switch (log_level) { case VSH_ERR_DEBUG: lvl =3D LVL_DEBUG; @@ -2754,7 +2754,7 @@ vshCompleterFilter(char ***list, if (!list || !*list) return -1; =20 - list_len =3D virStringListLength((const char **) *list); + list_len =3D virStringListLength((const char **)*list); =20 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 =3D ctl->name; # else - rl_readline_name =3D (char *) ctl->name; + rl_readline_name =3D (char *)ctl->name; # endif =20 /* 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 =3D break_characters; # else - rl_basic_word_break_characters =3D (char *) break_characters; + rl_basic_word_break_characters =3D (char *)break_characters; # endif =20 # if defined(RL_READLINE_VERSION) && RL_READLINE_VERSION > 0x0402 rl_completer_quote_characters =3D quote_characters; rl_char_is_quoted_p =3D vshReadlineCharIsQuoted; # else - rl_completer_quote_characters =3D (char *) quote_characters; - rl_char_is_quoted_p =3D (Function *) vshReadlineCharIsQuoted; + rl_completer_quote_characters =3D (char *)quote_characters; + rl_char_is_quoted_p =3D (Function *)vshReadlineCharIsQuoted; # endif =20 if (virAsprintf(&histsize_env, "%s_HISTSIZE", ctl->env_prefix) < 0) --=20 2.17.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list