From nobody Mon Feb 9 00:07:31 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 15246627187768.938108252766597; Wed, 25 Apr 2018 06:25:18 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 64D3E80474; Wed, 25 Apr 2018 13:25:15 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EE2203141D0C; Wed, 25 Apr 2018 13:25:13 +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 F0F584CAA1; Wed, 25 Apr 2018 13:25:12 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3PDPAjg002099 for ; Wed, 25 Apr 2018 09:25:10 -0400 Received: by smtp.corp.redhat.com (Postfix) id 71D03202323A; Wed, 25 Apr 2018 13:25:10 +0000 (UTC) Received: from caroline.localdomain (unknown [10.43.2.67]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EBF6A2023430 for ; Wed, 25 Apr 2018 13:25:09 +0000 (UTC) Received: from caroline.brq.redhat.com (caroline.usersys.redhat.com [127.0.0.1]) by caroline.localdomain (Postfix) with ESMTP id EB9CC12006E for ; Wed, 25 Apr 2018 15:25:08 +0200 (CEST) From: Martin Kletzander To: libvir-list@redhat.com Date: Wed, 25 Apr 2018 15:24:41 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 04/30] conf/: 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.84 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Wed, 25 Apr 2018 13:25:17 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Martin Kletzander --- src/conf/cpu_conf.c | 6 +-- src/conf/device_conf.c | 2 +- src/conf/domain_audit.c | 4 +- src/conf/domain_conf.c | 88 ++++++++++++++++++------------------- src/conf/interface_conf.c | 4 +- src/conf/network_conf.c | 4 +- src/conf/nwfilter_params.c | 4 +- src/conf/storage_conf.c | 48 ++++++++++---------- src/conf/virchrdev.c | 4 +- src/conf/virnodedeviceobj.c | 4 +- src/conf/virsecretobj.c | 2 +- src/conf/virstorageobj.c | 4 +- 12 files changed, 87 insertions(+), 87 deletions(-) diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c index 43a3ab5dcdfa..ca42760c38ba 100644 --- a/src/conf/cpu_conf.c +++ b/src/conf/cpu_conf.c @@ -448,21 +448,21 @@ virCPUDefParseXML(xmlXPathContextPtr ctxt, _("Missing 'sockets' attribute in CPU topology"= )); goto cleanup; } - def->sockets =3D (unsigned int) ul; + def->sockets =3D (unsigned int)ul; =20 if (virXPathULong("string(./topology[1]/@cores)", ctxt, &ul) < 0) { virReportError(VIR_ERR_XML_ERROR, "%s", _("Missing 'cores' attribute in CPU topology")); goto cleanup; } - def->cores =3D (unsigned int) ul; + def->cores =3D (unsigned int)ul; =20 if (virXPathULong("string(./topology[1]/@threads)", ctxt, &ul) < 0= ) { virReportError(VIR_ERR_XML_ERROR, "%s", _("Missing 'threads' attribute in CPU topology"= )); goto cleanup; } - def->threads =3D (unsigned int) ul; + def->threads =3D (unsigned int)ul; =20 if (!def->sockets || !def->cores || !def->threads) { virReportError(VIR_ERR_XML_ERROR, "%s", diff --git a/src/conf/device_conf.c b/src/conf/device_conf.c index d69f94fadf14..c408dee9541a 100644 --- a/src/conf/device_conf.c +++ b/src/conf/device_conf.c @@ -81,7 +81,7 @@ virDomainDeviceInfoAddressIsEqual(const virDomainDeviceIn= fo *a, if (a->type !=3D b->type) return false; =20 - switch ((virDomainDeviceAddressType) a->type) { + switch ((virDomainDeviceAddressType)a->type) { case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE: case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_LAST: /* address types below don't have any specific data */ diff --git a/src/conf/domain_audit.c b/src/conf/domain_audit.c index 82868bca76b0..b5fd1cafbcb8 100644 --- a/src/conf/domain_audit.c +++ b/src/conf/domain_audit.c @@ -162,7 +162,7 @@ virDomainAuditSmartcard(virDomainObjPtr vm, size_t i; =20 if (def) { - switch ((virDomainSmartcardType) def->type) { + switch ((virDomainSmartcardType)def->type) { case VIR_DOMAIN_SMARTCARD_TYPE_HOST: virDomainAuditGenericDev(vm, "smartcard", NULL, "nss-smartcard-device", @@ -1004,7 +1004,7 @@ virDomainAuditInput(virDomainObjPtr vm, if (!(vmname =3D virAuditEncode("vm", vm->def->name))) goto no_memory; =20 - switch ((virDomainInputType) input->type) { + switch ((virDomainInputType)input->type) { case VIR_DOMAIN_INPUT_TYPE_MOUSE: case VIR_DOMAIN_INPUT_TYPE_TABLET: case VIR_DOMAIN_INPUT_TYPE_KBD: diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index b0257068dabb..9c4a6b7f968e 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -1421,7 +1421,7 @@ void virDomainGraphicsDefFree(virDomainGraphicsDefPtr= def) =20 const char *virDomainInputDefGetPath(virDomainInputDefPtr input) { - switch ((virDomainInputType) input->type) { + switch ((virDomainInputType)input->type) { case VIR_DOMAIN_INPUT_TYPE_MOUSE: case VIR_DOMAIN_INPUT_TYPE_TABLET: case VIR_DOMAIN_INPUT_TYPE_KBD: @@ -1896,7 +1896,7 @@ virDomainControllerDefNew(virDomainControllerType typ= e) def->model =3D -1; def->idx =3D -1; =20 - switch ((virDomainControllerType) def->type) { + switch ((virDomainControllerType)def->type) { case VIR_DOMAIN_CONTROLLER_TYPE_VIRTIO_SERIAL: def->opts.vioserial.ports =3D -1; def->opts.vioserial.vectors =3D -1; @@ -2117,7 +2117,7 @@ virDomainChrSourceDefGetPath(virDomainChrSourceDefPtr= chr) if (!chr) return NULL; =20 - switch ((virDomainChrType) chr->type) { + switch ((virDomainChrType)chr->type) { case VIR_DOMAIN_CHR_TYPE_PTY: case VIR_DOMAIN_CHR_TYPE_DEV: case VIR_DOMAIN_CHR_TYPE_FILE: @@ -2558,7 +2558,7 @@ void virDomainHostdevDefClear(virDomainHostdevDefPtr = def) =20 switch (def->mode) { case VIR_DOMAIN_HOSTDEV_MODE_CAPABILITIES: - switch ((virDomainHostdevCapsType) def->source.caps.type) { + switch ((virDomainHostdevCapsType)def->source.caps.type) { case VIR_DOMAIN_HOSTDEV_CAPS_TYPE_STORAGE: VIR_FREE(def->source.caps.u.storage.block); break; @@ -2574,7 +2574,7 @@ void virDomainHostdevDefClear(virDomainHostdevDefPtr = def) } break; case VIR_DOMAIN_HOSTDEV_MODE_SUBSYS: - switch ((virDomainHostdevSubsysType) def->source.subsys.type) { + switch ((virDomainHostdevSubsysType)def->source.subsys.type) { case VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI: virDomainHostdevSubsysSCSIClear(&def->source.subsys.u.scsi); break; @@ -2673,7 +2673,7 @@ void virDomainDeviceDefFree(virDomainDeviceDefPtr def) if (!def) return; =20 - switch ((virDomainDeviceType) def->type) { + switch ((virDomainDeviceType)def->type) { case VIR_DOMAIN_DEVICE_DISK: virDomainDiskDefFree(def->data.disk); break; @@ -3566,7 +3566,7 @@ int virDomainDeviceAddressIsValid(virDomainDeviceInfo= Ptr info, virDomainDeviceInfoPtr virDomainDeviceGetInfo(virDomainDeviceDefPtr device) { - switch ((virDomainDeviceType) device->type) { + switch ((virDomainDeviceType)device->type) { case VIR_DOMAIN_DEVICE_DISK: return &device->data.disk->info; case VIR_DOMAIN_DEVICE_FS: @@ -3812,7 +3812,7 @@ virDomainDeviceInfoIterateInternal(virDomainDefPtr de= f, * statement has no real function here and should be optimized out by = the * compiler. */ i =3D VIR_DOMAIN_DEVICE_LAST; - switch ((virDomainDeviceType) i) { + switch ((virDomainDeviceType)i) { case VIR_DOMAIN_DEVICE_DISK: case VIR_DOMAIN_DEVICE_LEASE: case VIR_DOMAIN_DEVICE_FS: @@ -4086,7 +4086,7 @@ virDomainDefAddConsoleCompat(virDomainDefPtr def) } else if (def->os.type =3D=3D VIR_DOMAIN_OSTYPE_HVM && def->nserials = > 0 && def->serials[0]->deviceType =3D=3D VIR_DOMAIN_CHR_DEVICE_TY= PE_SERIAL) { =20 - switch ((virDomainChrSerialTargetType) def->serials[0]->targetType= ) { + switch ((virDomainChrSerialTargetType)def->serials[0]->targetType)= { case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_ISA: case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_SPAPR_VIO: case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_SYSTEM: @@ -5252,7 +5252,7 @@ static int virDomainChrSourceDefValidate(const virDomainChrSourceDef *def, const virDomainChrDef *chr_def) { - switch ((virDomainChrType) def->type) { + switch ((virDomainChrType)def->type) { case VIR_DOMAIN_CHR_TYPE_NULL: case VIR_DOMAIN_CHR_TYPE_PTY: case VIR_DOMAIN_CHR_TYPE_VC: @@ -5451,7 +5451,7 @@ static int virDomainHostdevDefValidate(const virDomainHostdevDef *hostdev) { if (hostdev->mode =3D=3D VIR_DOMAIN_HOSTDEV_MODE_SUBSYS) { - switch ((virDomainHostdevSubsysType) hostdev->source.subsys.type) { + switch ((virDomainHostdevSubsysType)hostdev->source.subsys.type) { case VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI: if (hostdev->info->type !=3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NO= NE && hostdev->info->type !=3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PC= I) { @@ -5512,7 +5512,7 @@ static int virDomainDeviceDefValidateInternal(const virDomainDeviceDef *dev, const virDomainDef *def) { - switch ((virDomainDeviceType) dev->type) { + switch ((virDomainDeviceType)dev->type) { case VIR_DOMAIN_DEVICE_DISK: return virDomainDiskDefValidate(dev->data.disk); =20 @@ -5602,7 +5602,7 @@ virDomainDeviceDefValidateAliasesIterator(virDomainDe= fPtr def, return -1; } =20 - if (virHashAddEntry(data->aliases, alias, (void *) 1) < 0) { + if (virHashAddEntry(data->aliases, alias, (void *)1) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Unable to construct table of device aliases")); return -1; @@ -6124,7 +6124,7 @@ virDomainDeviceInfoFormat(virBufferPtr buf, virBufferAsprintf(buf, "
type)); =20 - switch ((virDomainDeviceAddressType) info->type) { + switch ((virDomainDeviceAddressType)info->type) { case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI: if (!virPCIDeviceAddressIsEmpty(&info->addr.pci)) { virBufferAsprintf(buf, " domain=3D'0x%.4x' bus=3D'0x%.2x' " @@ -6534,7 +6534,7 @@ virDomainDeviceBootParseXML(xmlNodePtr node, goto cleanup; } =20 - if (virHashAddEntry(bootHash, order, (void *) 1) < 0) + if (virHashAddEntry(bootHash, order, (void *)1) < 0) goto cleanup; } =20 @@ -6650,7 +6650,7 @@ virDomainDeviceAddressParseXML(xmlNodePtr address, goto cleanup; } =20 - switch ((virDomainDeviceAddressType) info->type) { + switch ((virDomainDeviceAddressType)info->type) { case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI: if (virPCIDeviceAddressParseXML(address, &info->addr.pci) < 0) goto cleanup; @@ -7384,7 +7384,7 @@ virDomainHostdevSubsysSCSIVHostDefParseXML(xmlNodePtr= sourcenode, goto cleanup; } =20 - switch ((virDomainHostdevSubsysSCSIHostProtocolType) hostsrc->protocol= ) { + switch ((virDomainHostdevSubsysSCSIHostProtocolType)hostsrc->protocol)= { case VIR_DOMAIN_HOSTDEV_SUBSYS_SCSI_HOST_PROTOCOL_TYPE_VHOST: if (!(wwpn =3D virXMLPropString(sourcenode, "wwpn"))) { virReportError(VIR_ERR_XML_ERROR, "%s", @@ -11692,7 +11692,7 @@ virDomainNetDefParseXML(virDomainXMLOptionPtr xmlop= t, static int virDomainChrDefaultTargetType(int devtype) { - switch ((virDomainChrDeviceType) devtype) { + switch ((virDomainChrDeviceType)devtype) { case VIR_DOMAIN_CHR_DEVICE_TYPE_CHANNEL: virReportError(VIR_ERR_XML_ERROR, _("target type must be specified for %s device"), @@ -11723,7 +11723,7 @@ virDomainChrTargetTypeFromString(int devtype, if (!targetType) return virDomainChrDefaultTargetType(devtype); =20 - switch ((virDomainChrDeviceType) devtype) { + switch ((virDomainChrDeviceType)devtype) { case VIR_DOMAIN_CHR_DEVICE_TYPE_CHANNEL: ret =3D virDomainChrChannelTargetTypeFromString(targetType); break; @@ -11755,7 +11755,7 @@ virDomainChrTargetModelFromString(int devtype, if (!targetModel) return 0; =20 - switch ((virDomainChrDeviceType) devtype) { + switch ((virDomainChrDeviceType)devtype) { case VIR_DOMAIN_CHR_DEVICE_TYPE_SERIAL: ret =3D virDomainChrSerialTargetModelTypeFromString(targetModel); break; @@ -12148,7 +12148,7 @@ virDomainChrSourceDefParseXML(virDomainChrSourceDef= Ptr def, } sourceParsed++; =20 - switch ((virDomainChrType) def->type) { + switch ((virDomainChrType)def->type) { case VIR_DOMAIN_CHR_TYPE_FILE: if (virDomainChrSourceDefParseFile(def, cur) < 0) goto error; @@ -12370,7 +12370,7 @@ virDomainChrDefParseXML(virDomainXMLOptionPtr xmlop= t, goto error; } =20 - nodeName =3D (const char *) node->name; + nodeName =3D (const char *)node->name; if ((def->deviceType =3D virDomainChrDeviceTypeFromString(nodeName)) <= 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unknown character device type: %s"), @@ -15103,7 +15103,7 @@ virDomainHostdevDefParseXML(virDomainXMLOptionPtr x= mlopt, goto error; } if (def->mode =3D=3D VIR_DOMAIN_HOSTDEV_MODE_SUBSYS) { - switch ((virDomainHostdevSubsysType) def->source.subsys.type) { + switch ((virDomainHostdevSubsysType)def->source.subsys.type) { case VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI: if (virXPathBoolean("boolean(./readonly)", ctxt)) def->readonly =3D true; @@ -15763,7 +15763,7 @@ virDomainDeviceDefParse(const char *xmlStr, if (VIR_ALLOC(dev) < 0) goto error; =20 - if ((dev->type =3D virDomainDeviceTypeFromString((const char *) node->= name)) < 0) { + if ((dev->type =3D virDomainDeviceTypeFromString((const char *)node->n= ame)) < 0) { /* Some crazy mapping of serial, parallel, console and channel to * VIR_DOMAIN_DEVICE_CHR. */ if (virXMLNodeNameEqual(node, "channel") || @@ -15779,7 +15779,7 @@ virDomainDeviceDefParse(const char *xmlStr, } } =20 - switch ((virDomainDeviceType) dev->type) { + switch ((virDomainDeviceType)dev->type) { case VIR_DOMAIN_DEVICE_DISK: if (!(dev->data.disk =3D virDomainDiskDefParseXML(xmlopt, node, ct= xt, NULL, def->seclabe= ls, @@ -16087,7 +16087,7 @@ virDomainHostdevMatchSubsys(virDomainHostdevDefPtr = a, if (a->source.subsys.type !=3D b->source.subsys.type) return 0; =20 - switch ((virDomainHostdevSubsysType) a->source.subsys.type) { + switch ((virDomainHostdevSubsysType)a->source.subsys.type) { case VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI: return virDomainHostdevMatchSubsysPCI(a, b); case VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_USB: @@ -16785,11 +16785,11 @@ virDomainChrEquals(virDomainChrDefPtr src, !virDomainChrSourceDefIsEqual(src->source, tgt->source)) return false; =20 - switch ((virDomainChrDeviceType) src->deviceType) { + switch ((virDomainChrDeviceType)src->deviceType) { case VIR_DOMAIN_CHR_DEVICE_TYPE_CHANNEL: if (src->targetType !=3D tgt->targetType) return false; - switch ((virDomainChrChannelTargetType) src->targetType) { + switch ((virDomainChrChannelTargetType)src->targetType) { case VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_XEN: case VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_VIRTIO: return STREQ_NULLABLE(src->target.name, tgt->target.name); @@ -16901,7 +16901,7 @@ virDomainChrGetDomainPtrs(const virDomainDef *vmdef, *arrPtr =3D NULL; *cntPtr =3D 0; } else { - *arrPtr =3D (const virDomainChrDef **) *arrVar; + *arrPtr =3D (const virDomainChrDef **)*arrVar; *cntPtr =3D *cntVar; } } @@ -17994,7 +17994,7 @@ virDomainLoaderDefParseXML(xmlNodePtr node, readonly_str =3D virXMLPropString(node, "readonly"); secure_str =3D virXMLPropString(node, "secure"); type_str =3D virXMLPropString(node, "type"); - loader->path =3D (char *) xmlNodeGetContent(node); + loader->path =3D (char *)xmlNodeGetContent(node); =20 if (readonly_str && (loader->readonly =3D virTristateBoolTypeFromString(readonly_str))= <=3D 0) { @@ -20668,7 +20668,7 @@ virDomainDeviceInfoCheckABIStability(virDomainDevic= eInfoPtr src, return false; } =20 - switch ((virDomainDeviceAddressType) src->type) { + switch ((virDomainDeviceAddressType)src->type) { case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI: if (src->addr.pci.domain !=3D dst->addr.pci.domain || src->addr.pci.bus !=3D dst->addr.pci.bus || @@ -22313,7 +22313,7 @@ virDomainDefCheckABIStabilityFlags(virDomainDefPtr = src, * also have to add an check above. Otherwise the switch statement has= no * real function here and should be optimized out by the compiler. */ i =3D VIR_DOMAIN_DEVICE_LAST; - switch ((virDomainDeviceType) i) { + switch ((virDomainDeviceType)i) { case VIR_DOMAIN_DEVICE_DISK: case VIR_DOMAIN_DEVICE_LEASE: case VIR_DOMAIN_DEVICE_FS: @@ -22463,7 +22463,7 @@ virDomainDefMaybeAddSmartcardController(virDomainDe= fPtr def) virDomainDeviceInfoPtr info =3D &def->smartcards[j]->info; if (info->type =3D=3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCID = && info->addr.ccid.controller =3D=3D 0 && - (int) info->addr.ccid.slot > max) + (int)info->addr.ccid.slot > max) max =3D info->addr.ccid.slot; } smartcard->info.type =3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCID; @@ -24575,7 +24575,7 @@ virDomainChrTargetDefFormat(virBufferPtr buf, const char *targetType =3D virDomainChrTargetTypeToString(def->deviceT= ype, def->targetTyp= e); =20 - switch ((virDomainChrDeviceType) def->deviceType) { + switch ((virDomainChrDeviceType)def->deviceType) { case VIR_DOMAIN_CHR_DEVICE_TYPE_CHANNEL: { if (!targetType) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", @@ -26587,7 +26587,7 @@ virDomainDefFormatInternal(virDomainDefPtr def, xmlIndentTreeOutput =3D oldIndentTreeOutput; goto error; } - virBufferAsprintf(buf, "%s\n", (char *) xmlBufferContent(xmlbuf)); + virBufferAsprintf(buf, "%s\n", (char *)xmlBufferContent(xmlbuf)); xmlBufferFree(xmlbuf); xmlIndentTreeOutput =3D oldIndentTreeOutput; } @@ -28357,7 +28357,7 @@ virDomainDeviceDefCopy(virDomainDeviceDefPtr src, int rc =3D -1; char *netprefix; =20 - switch ((virDomainDeviceType) src->type) { + switch ((virDomainDeviceType)src->type) { case VIR_DOMAIN_DEVICE_DISK: rc =3D virDomainDiskDefFormat(&buf, src->data.disk, flags, xmlopt); break; @@ -28548,7 +28548,7 @@ virDomainObjGetMetadata(virDomainObjPtr vm, if (!(def =3D virDomainObjGetOneDef(vm, flags))) goto cleanup; =20 - switch ((virDomainMetadataType) type) { + switch ((virDomainMetadataType)type) { case VIR_DOMAIN_METADATA_DESCRIPTION: if (VIR_STRDUP(ret, def->description) < 0) goto cleanup; @@ -28600,7 +28600,7 @@ virDomainDefSetMetadata(virDomainDefPtr def, goto cleanup; } =20 - switch ((virDomainMetadataType) type) { + switch ((virDomainMetadataType)type) { case VIR_DOMAIN_METADATA_DESCRIPTION: if (VIR_STRDUP(tmp, metadata) < 0) goto cleanup; @@ -28776,21 +28776,21 @@ virDomainDefGetShortName(const virDomainDef *def) * characters. The same applies for illegal sequences as they can occ= ur * with incompatible locales. */ len =3D mbstowcs(NULL, def->name, 0); - if ((len =3D=3D (size_t) -1 && errno =3D=3D EILSEQ) || + if ((len =3D=3D (size_t)-1 && errno =3D=3D EILSEQ) || len =3D=3D strlen(def->name)) { ignore_value(virAsprintf(&ret, "%d-%.*s", def->id, VIR_DOMAIN_SHORT_NAME_MAX, def->name)); return ret; } =20 - if (len =3D=3D (size_t) -1) { + if (len =3D=3D (size_t)-1) { virReportSystemError(errno, "%s", _("Cannot convert domain name to " "wide character string")); return NULL; } =20 - if (mbstowcs(wshortname, def->name, VIR_DOMAIN_SHORT_NAME_MAX) =3D=3D = (size_t) -1) { + if (mbstowcs(wshortname, def->name, VIR_DOMAIN_SHORT_NAME_MAX) =3D=3D = (size_t)-1) { virReportSystemError(errno, "%s", _("Cannot convert domain name to " "wide character string")); @@ -28798,7 +28798,7 @@ virDomainDefGetShortName(const virDomainDef *def) } =20 len =3D wcstombs(NULL, wshortname, 0); - if (len =3D=3D (size_t) -1) { + if (len =3D=3D (size_t)-1) { virReportSystemError(errno, "%s", _("Cannot convert wide character string " "back to multi-byte domain name")); @@ -28808,7 +28808,7 @@ virDomainDefGetShortName(const virDomainDef *def) if (VIR_ALLOC_N(shortname, len + 1) < 0) return NULL; =20 - if (wcstombs(shortname, wshortname, len) =3D=3D (size_t) -1) { + if (wcstombs(shortname, wshortname, len) =3D=3D (size_t)-1) { virReportSystemError(errno, "%s", _("Cannot convert wide character string " "back to multi-byte domain name")); @@ -29305,7 +29305,7 @@ virDomainDiskTranslateSourcePool(virDomainDiskDefPt= r def) virStorageAuthDefFree(def->src->auth); def->src->auth =3D NULL; =20 - switch ((virStoragePoolType) pooldef->type) { + switch ((virStoragePoolType)pooldef->type) { case VIR_STORAGE_POOL_DIR: case VIR_STORAGE_POOL_FS: case VIR_STORAGE_POOL_NETFS: diff --git a/src/conf/interface_conf.c b/src/conf/interface_conf.c index 0a4b28f489fa..aec756e083ef 100644 --- a/src/conf/interface_conf.c +++ b/src/conf/interface_conf.c @@ -146,7 +146,7 @@ virInterfaceDefParseMtu(virInterfaceDefPtr def, "%s", _("interface mtu value is improper")); return -1; } else if (ret =3D=3D 0) { - def->mtu =3D (unsigned int) mtu; + def->mtu =3D (unsigned int)mtu; } return 0; } @@ -305,7 +305,7 @@ virInterfaceDefParseIP(virInterfaceIPDefPtr def, if (tmp !=3D NULL) { ret =3D virXPathLong("string(./@prefix)", ctxt, &l); if (ret =3D=3D 0) { - def->prefix =3D (int) l; + def->prefix =3D (int)l; } else if (ret =3D=3D -2) { virReportError(VIR_ERR_XML_ERROR, "%s", _("Invalid ip address prefix value")); diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c index 630a87fc07f7..96c31d6184cd 100644 --- a/src/conf/network_conf.c +++ b/src/conf/network_conf.c @@ -611,7 +611,7 @@ virNetworkDNSHostDefParseXML(const char *networkName, if (cur->type =3D=3D XML_ELEMENT_NODE && virXMLNodeNameEqual(cur, "hostname")) { if (cur->children !=3D NULL) { - char *name =3D (char *) xmlNodeGetContent(cur); + char *name =3D (char *)xmlNodeGetContent(cur); =20 if (!name) { virReportError(VIR_ERR_XML_DETAIL, @@ -2384,7 +2384,7 @@ virNetworkDefFormatBuf(virBufferPtr buf, xmlIndentTreeOutput =3D oldIndentTreeOutput; goto error; } - virBufferAsprintf(buf, "%s\n", (char *) xmlBufferContent(xmlbuf)); + virBufferAsprintf(buf, "%s\n", (char *)xmlBufferContent(xmlbuf)); xmlBufferFree(xmlbuf); xmlIndentTreeOutput =3D oldIndentTreeOutput; } diff --git a/src/conf/nwfilter_params.c b/src/conf/nwfilter_params.c index 3a010491826a..8a3fd075388c 100644 --- a/src/conf/nwfilter_params.c +++ b/src/conf/nwfilter_params.c @@ -762,8 +762,8 @@ virNWFilterHashTablePutAll(virNWFilterHashTablePtr src, static int virNWFilterVarValueCompare(const void *a, const void *b) { - return virNWFilterVarValueEqual((const virNWFilterVarValue *) a, - (const virNWFilterVarValue *) b) ? 0 := 1; + return virNWFilterVarValueEqual((const virNWFilterVarValue *)a, + (const virNWFilterVarValue *)b) ? 0 : = 1; } =20 bool diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index 5036ab9ef8a0..8b3c25344bec 100644 --- a/src/conf/storage_conf.c +++ b/src/conf/storage_conf.c @@ -606,9 +606,9 @@ virStorageDefParsePerms(xmlXPathContextPtr ctxt, node =3D virXPathNode(permxpath, ctxt); if (node =3D=3D NULL) { /* Set default values if there is not element */ - perms->mode =3D (mode_t) -1; - perms->uid =3D (uid_t) -1; - perms->gid =3D (gid_t) -1; + perms->mode =3D (mode_t)-1; + perms->uid =3D (uid_t)-1; + perms->gid =3D (gid_t)-1; perms->label =3D NULL; return 0; } @@ -628,11 +628,11 @@ virStorageDefParsePerms(xmlXPathContextPtr ctxt, perms->mode =3D tmp; VIR_FREE(mode); } else { - perms->mode =3D (mode_t) -1; + perms->mode =3D (mode_t)-1; } =20 if (virXPathNode("./owner", ctxt) =3D=3D NULL) { - perms->uid =3D (uid_t) -1; + perms->uid =3D (uid_t)-1; } else { /* We previously could output -1, so continue to parse it */ if (virXPathLongLong("number(./owner)", ctxt, &val) < 0 || @@ -647,11 +647,11 @@ virStorageDefParsePerms(xmlXPathContextPtr ctxt, } =20 if (virXPathNode("./group", ctxt) =3D=3D NULL) { - perms->gid =3D (gid_t) -1; + perms->gid =3D (gid_t)-1; } else { /* We previously could output -1, so continue to parse it */ if (virXPathLongLong("number(./group)", ctxt, &val) < 0 || - ((gid_t) val !=3D val && + ((gid_t)val !=3D val && val !=3D -1)) { virReportError(VIR_ERR_XML_ERROR, "%s", _("malformed group element")); @@ -1010,21 +1010,21 @@ virStoragePoolDefFormatBuf(virBufferPtr buf, =20 virBufferEscapeString(buf, "%s\n", def->target.path); =20 - if (def->target.perms.mode !=3D (mode_t) -1 || - def->target.perms.uid !=3D (uid_t) -1 || - def->target.perms.gid !=3D (gid_t) -1 || + if (def->target.perms.mode !=3D (mode_t)-1 || + def->target.perms.uid !=3D (uid_t)-1 || + def->target.perms.gid !=3D (gid_t)-1 || def->target.perms.label) { virBufferAddLit(buf, "\n"); virBufferAdjustIndent(buf, 2); - if (def->target.perms.mode !=3D (mode_t) -1) + if (def->target.perms.mode !=3D (mode_t)-1) virBufferAsprintf(buf, "0%o\n", def->target.perms.mode); - if (def->target.perms.uid !=3D (uid_t) -1) + if (def->target.perms.uid !=3D (uid_t)-1) virBufferAsprintf(buf, "%d\n", - (int) def->target.perms.uid); - if (def->target.perms.gid !=3D (gid_t) -1) + (int)def->target.perms.uid); + if (def->target.perms.gid !=3D (gid_t)-1) virBufferAsprintf(buf, "%d\n", - (int) def->target.perms.gid); + (int)def->target.perms.gid); virBufferEscapeString(buf, "\n", def->target.perms.label); =20 @@ -1334,7 +1334,7 @@ virStorageVolTimestampFormat(virBufferPtr buf, const = char *name, if (ts->tv_nsec < 0) return; virBufferAsprintf(buf, "<%s>%llu", name, - (unsigned long long) ts->tv_sec); + (unsigned long long)ts->tv_sec); if (ts->tv_nsec) virBufferAsprintf(buf, ".%09ld", ts->tv_nsec); virBufferAsprintf(buf, "\n", name); @@ -1364,22 +1364,22 @@ virStorageVolTargetDefFormat(virStorageVolOptionsPt= r options, } =20 if (def->perms && - (def->perms->mode !=3D (mode_t) -1 || - def->perms->uid !=3D (uid_t) -1 || - def->perms->gid !=3D (gid_t) -1 || + (def->perms->mode !=3D (mode_t)-1 || + def->perms->uid !=3D (uid_t)-1 || + def->perms->gid !=3D (gid_t)-1 || def->perms->label)) { virBufferAddLit(buf, "\n"); virBufferAdjustIndent(buf, 2); =20 - if (def->perms->mode !=3D (mode_t) -1) + if (def->perms->mode !=3D (mode_t)-1) virBufferAsprintf(buf, "0%o\n", def->perms->mode); - if (def->perms->uid !=3D (uid_t) -1) + if (def->perms->uid !=3D (uid_t)-1) virBufferAsprintf(buf, "%d\n", - (int) def->perms->uid); - if (def->perms->gid !=3D (gid_t) -1) + (int)def->perms->uid); + if (def->perms->gid !=3D (gid_t)-1) virBufferAsprintf(buf, "%d\n", - (int) def->perms->gid); + (int)def->perms->gid); =20 virBufferEscapeString(buf, "\n", def->perms->label); diff --git a/src/conf/virchrdev.c b/src/conf/virchrdev.c index 416a7a129c78..afdcd97e567f 100644 --- a/src/conf/virchrdev.c +++ b/src/conf/virchrdev.c @@ -128,7 +128,7 @@ static int virChrdevLockFileCreate(const char *dev) virReportError(VIR_ERR_OPERATION_FAILED, _("Requested device '%s' is locked by " "lock file '%s' held by process %lld"), - dev, path, (long long) pid); + dev, path, (long long)pid); goto cleanup; } else { /* clean up the stale/corrupted/nonexistent lockfile */ @@ -138,7 +138,7 @@ static int virChrdevLockFileCreate(const char *dev) =20 /* ensure correct format according to filesystem hierarchy standard */ /* http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLOCKLOCKFILES */ - if (virAsprintf(&pidStr, "%10lld\n", (long long) getpid()) < 0) + if (virAsprintf(&pidStr, "%10lld\n", (long long)getpid()) < 0) goto cleanup; =20 /* create the lock file */ diff --git a/src/conf/virnodedeviceobj.c b/src/conf/virnodedeviceobj.c index 13e9a1751851..d894093dbb7d 100644 --- a/src/conf/virnodedeviceobj.c +++ b/src/conf/virnodedeviceobj.c @@ -258,7 +258,7 @@ virNodeDeviceObjListFindByWWNsCallback(const void *payl= oad, { virNodeDeviceObjPtr obj =3D (virNodeDeviceObjPtr) payload; struct virNodeDeviceObjListFindByWWNsData *data =3D - (struct virNodeDeviceObjListFindByWWNsData *) opaque; + (struct virNodeDeviceObjListFindByWWNsData *)opaque; virNodeDevCapsDefPtr cap; int want =3D 0; =20 @@ -356,7 +356,7 @@ virNodeDeviceObjListFindSCSIHostByWWNsCallback(const vo= id *payload, { virNodeDeviceObjPtr obj =3D (virNodeDeviceObjPtr) payload; struct virNodeDeviceObjListFindSCSIHostByWWNsData *data =3D - (struct virNodeDeviceObjListFindSCSIHostByWWNsData *) opaque; + (struct virNodeDeviceObjListFindSCSIHostByWWNsData *)opaque; virNodeDevCapsDefPtr cap; int want =3D 0; =20 diff --git a/src/conf/virsecretobj.c b/src/conf/virsecretobj.c index 48ce3c814178..7ad6196a3add 100644 --- a/src/conf/virsecretobj.c +++ b/src/conf/virsecretobj.c @@ -203,7 +203,7 @@ virSecretObjSearchName(const void *payload, { virSecretObjPtr obj =3D (virSecretObjPtr) payload; virSecretDefPtr def; - struct virSecretSearchData *data =3D (struct virSecretSearchData *) op= aque; + struct virSecretSearchData *data =3D (struct virSecretSearchData *)opa= que; int found =3D 0; =20 virObjectLock(obj); diff --git a/src/conf/virstorageobj.c b/src/conf/virstorageobj.c index 6c937f105ca9..54535a799fe3 100644 --- a/src/conf/virstorageobj.c +++ b/src/conf/virstorageobj.c @@ -754,7 +754,7 @@ virStoragePoolObjSearchVolumeCb(const void *payload, { virStorageVolObjPtr volobj =3D (virStorageVolObjPtr) payload; struct _virStoragePoolObjSearchVolData *data =3D - (struct _virStoragePoolObjSearchVolData *) opaque; + (struct _virStoragePoolObjSearchVolData *)opaque; int found =3D 0; =20 virObjectLock(volobj); @@ -1812,7 +1812,7 @@ virStoragePoolObjSourceFindDuplicateCb(const void *pa= yload, { virStoragePoolObjPtr obj =3D (virStoragePoolObjPtr) payload; struct _virStoragePoolObjFindDuplicateData *data =3D - (struct _virStoragePoolObjFindDuplicateData *) opaque; + (struct _virStoragePoolObjFindDuplicateData *)opaque; =20 /* Don't match against ourself if re-defining existing pool ! */ if (STREQ(obj->def->name, data->def->name)) --=20 2.17.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list