From nobody Sun Feb 8 19:35:38 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1571925611; cv=none; d=zoho.com; s=zohoarc; b=Dz5ar2x0wLeSKO0jIhMUN/VnyqrtENzS8JcRiuAyLtS+BPAkCVHkWcsXbKd1BEvrnmP9ALtB8so39FvQugu+0WjCz4x7LTciJDBHa9c5iv87Kqc1G9cdWqPOWkpdLswc8JjiCn+dyQxXDBc/TTwHtTXE6RVqvs8kRIQOc+lnnsw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571925611; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ypWm9ItCwmowSaWW9SS404M0XTs8VxGBMoyTtU7aA24=; b=AsEZev2ivM2XHBaHJPv1Rp7da/pv/DbCbKTBX/99jsWNgygG0L8VAMH7LizUb3dS1Dn+2p+UTrpcKtLPOGr2KflMw1VljP+pTx2sjoXmzaRIy413msgw6OECloIDpJmscM/NP2CPbCXdcqFc/Kw4XW65Qu04ATBDki4IQqNc3zw= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1571925611638839.0924110820346; Thu, 24 Oct 2019 07:00:11 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-266-IF1mByi4MIGtbITWsmTWUg-1; Thu, 24 Oct 2019 09:57:26 -0400 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 32FB9800D5F; Thu, 24 Oct 2019 13:57:21 +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 0EF205C223; Thu, 24 Oct 2019 13:57:21 +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 BB2C9180BAA7; Thu, 24 Oct 2019 13:57:20 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x9ODvBUD026467 for ; Thu, 24 Oct 2019 09:57:11 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6E3A010098FB; Thu, 24 Oct 2019 13:57:11 +0000 (UTC) Received: from angien.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id EBA8F10027A9 for ; Thu, 24 Oct 2019 13:57:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1571925609; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=ypWm9ItCwmowSaWW9SS404M0XTs8VxGBMoyTtU7aA24=; b=ZjlxaqN1zQDZYmInAbqlIbSZ5njm3uvGVX1kSYyEkgABu93PDCwDPFxDJD/rN4hecm8Ire m1sdkm77edtiCwPH+9efgUKd7vr7bI9t51JkpcqKbZ9xiGjjdb7FqetOjNdNNE23uBW1dB 6tZvmYtGipdFFu5r9frHawyujKCyCQk= From: Peter Krempa To: libvir-list@redhat.com Date: Thu, 24 Oct 2019 15:56:37 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 19/19] util: xml: Make virXMLFormatElement void 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: , 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-MC-Unique: IF1mByi4MIGtbITWsmTWUg-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Now that we don't have to deal with errors of virBuffer we can also make this function void. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/conf/domain_conf.c | 112 +++++++++++++++++++---------------------- src/qemu/qemu_domain.c | 24 ++++----- src/util/virsysinfo.c | 5 +- src/util/virxml.c | 14 ++---- src/util/virxml.h | 5 +- 5 files changed, 69 insertions(+), 91 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 778858fe3e..5d45cb23a9 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -7254,8 +7254,7 @@ virDomainDeviceInfoFormat(virBufferPtr buf, break; } - if (virXMLFormatElement(buf, "address", &attrBuf, &childBuf) < 0) - goto cleanup; + virXMLFormatElement(buf, "address", &attrBuf, &childBuf); ret =3D 0; @@ -24126,8 +24125,7 @@ virDomainDiskSourceFormatPrivateData(virBufferPtr b= uf, if (xmlopt->privateData.storageFormat(src, &childBuf) < 0) goto cleanup; - if (virXMLFormatElement(buf, "privateData", NULL, &childBuf) < 0) - goto cleanup; + virXMLFormatElement(buf, "privateData", NULL, &childBuf); ret =3D 0; @@ -24233,8 +24231,7 @@ virDomainDiskSourceFormat(virBufferPtr buf, if (virDomainDiskSourceFormatPrivateData(&childBuf, src, flags, xmlopt= ) < 0) return -1; - if (virXMLFormatElement(buf, element, &attrBuf, &childBuf) < 0) - return -1; + virXMLFormatElement(buf, element, &attrBuf, &childBuf); return 0; } @@ -24286,8 +24283,7 @@ virDomainDiskBackingStoreFormat(virBufferPtr buf, if (virDomainDiskBackingStoreFormat(&childBuf, backingStore, xmlopt, f= lags) < 0) return -1; - if (virXMLFormatElement(buf, "backingStore", &attrBuf, &childBuf) < 0) - return -1; + virXMLFormatElement(buf, "backingStore", &attrBuf, &childBuf); return 0; } @@ -24338,7 +24334,9 @@ virDomainDiskDefFormatIotune(virBufferPtr buf, FORMAT_IOTUNE(read_iops_sec_max_length); FORMAT_IOTUNE(write_iops_sec_max_length); - return virXMLFormatElement(buf, "iotune", NULL, &childBuf); + virXMLFormatElement(buf, "iotune", NULL, &childBuf); + + return 0; } #undef FORMAT_IOTUNE @@ -24400,7 +24398,8 @@ virDomainDiskDefFormatDriver(virBufferPtr buf, virDomainVirtioOptionsFormat(&driverBuf, disk->virtio); - return virXMLFormatElement(buf, "driver", &driverBuf, NULL); + virXMLFormatElement(buf, "driver", &driverBuf, NULL); + return 0; } @@ -24450,8 +24449,7 @@ virDomainDiskDefFormatMirror(virBufferPtr buf, if (virDomainDiskBackingStoreFormat(&childBuf, disk->mirror, xmlopt, f= lags) < 0) return -1; - if (virXMLFormatElement(buf, "mirror", &attrBuf, &childBuf) < 0) - return -1; + virXMLFormatElement(buf, "mirror", &attrBuf, &childBuf); return 0; } @@ -24475,7 +24473,8 @@ virDomainDiskDefFormatPrivateData(virBufferPtr buf, if (xmlopt->privateData.diskFormat(disk, &childBuf) < 0) return -1; - return virXMLFormatElement(buf, "privateData", NULL, &childBuf); + virXMLFormatElement(buf, "privateData", NULL, &childBuf); + return 0; } @@ -24633,7 +24632,9 @@ virDomainControllerDriverFormat(virBufferPtr buf, virDomainVirtioOptionsFormat(&driverBuf, def->virtio); - return virXMLFormatElement(buf, "driver", &driverBuf, NULL); + virXMLFormatElement(buf, "driver", &driverBuf, NULL); + + return 0; } @@ -24785,7 +24786,9 @@ virDomainControllerDefFormat(virBufferPtr buf, "pcihole64>\n", def->opts.pciopts.pcihole64size); } - return virXMLFormatElement(buf, "controller", &attrBuf, &childBuf); + virXMLFormatElement(buf, "controller", &attrBuf, &childBuf); + + return 0; } @@ -25628,8 +25631,7 @@ virDomainNetDefFormat(virBufferPtr buf, virTristateBoolTypeToString(def->managed_tap)); } - if (virXMLFormatElement(buf, "target", &attrBuf, NULL) < 0) - return -1; + virXMLFormatElement(buf, "target", &attrBuf, NULL); if (def->ifname_guest || def->ifname_guest_actual) { virBufferAddLit(buf, "nseclabels, def->seclabels, flags); - if (virXMLFormatElement(buf, "source", &attrBuf, &childBuf) < = 0) - goto error; + virXMLFormatElement(buf, "source", &attrBuf, &childBuf); } break; @@ -25822,8 +25823,7 @@ virDomainChrSourceDefFormat(virBufferPtr buf, virDomainChrSourceReconnectDefFormat(&childBuf, &def->data.tcp.reconnect); - if (virXMLFormatElement(buf, "source", &attrBuf, &childBuf) < 0) - goto error; + virXMLFormatElement(buf, "source", &attrBuf, &childBuf); virBufferAsprintf(buf, "\n", virDomainChrTcpProtocolTypeToString( @@ -25841,8 +25841,7 @@ virDomainChrSourceDefFormat(virBufferPtr buf, virDomainChrSourceReconnectDefFormat(&childBuf, &def->data.nix.reconnect); - if (virXMLFormatElement(buf, "source", &attrBuf, &childBuf) < = 0) - goto error; + virXMLFormatElement(buf, "source", &attrBuf, &childBuf); } break; @@ -25863,9 +25862,6 @@ virDomainChrSourceDefFormat(virBufferPtr buf, } return 0; - - error: - return -1; } @@ -26229,10 +26225,10 @@ virDomainMemballoonDefFormat(virBufferPtr buf, virDomainVirtioOptionsFormat(&driverAttrBuf, def->virtio); - if (virXMLFormatElement(&childrenBuf, "driver", &driverAttrBuf, NULL) = < 0) - return -1; + virXMLFormatElement(&childrenBuf, "driver", &driverAttrBuf, NULL); + virXMLFormatElement(buf, "memballoon", &attrBuf, &childrenBuf); - return virXMLFormatElement(buf, "memballoon", &attrBuf, &childrenBuf); + return 0; } static int @@ -26281,7 +26277,9 @@ virDomainWatchdogDefFormat(virBufferPtr buf, if (virDomainDeviceInfoFormat(&childBuf, &def->info, flags) < 0) return -1; - return virXMLFormatElement(buf, "watchdog", &attrBuf, &childBuf); + virXMLFormatElement(buf, "watchdog", &attrBuf, &childBuf); + + return 0; } static int virDomainPanicDefFormat(virBufferPtr buf, @@ -26298,7 +26296,9 @@ static int virDomainPanicDefFormat(virBufferPtr buf, if (virDomainDeviceInfoFormat(&childrenBuf, &def->info, 0) < 0) return -1; - return virXMLFormatElement(buf, "panic", &attrBuf, &childrenBuf); + virXMLFormatElement(buf, "panic", &attrBuf, &childrenBuf); + + return 0; } static int @@ -26381,8 +26381,7 @@ virDomainRNGDefFormat(virBufferPtr buf, virDomainVirtioOptionsFormat(&driverAttrBuf, def->virtio); - if (virXMLFormatElement(buf, "driver", &driverAttrBuf, NULL) < 0) - return -1; + virXMLFormatElement(buf, "driver", &driverAttrBuf, NULL); if (virDomainDeviceInfoFormat(buf, &def->info, flags) < 0) return -1; @@ -26664,14 +26663,15 @@ virDomainInputDefFormat(virBufferPtr buf, virBufferSetChildIndent(&childBuf, buf); virDomainVirtioOptionsFormat(&driverAttrBuf, def->virtio); - if (virXMLFormatElement(&childBuf, "driver", &driverAttrBuf, NULL) < 0) - return -1; + virXMLFormatElement(&childBuf, "driver", &driverAttrBuf, NULL); virBufferEscapeString(&childBuf, "\n", def->sour= ce.evdev); if (virDomainDeviceInfoFormat(&childBuf, &def->info, flags) < 0) return -1; - return virXMLFormatElement(buf, "input", &attrBuf, &childBuf); + virXMLFormatElement(buf, "input", &attrBuf, &childBuf); + + return 0; } @@ -27373,7 +27373,9 @@ virDomainHubDefFormat(virBufferPtr buf, virBufferAsprintf(&attrBuf, " type=3D'%s'", type); - return virXMLFormatElement(buf, "hub", &attrBuf, &childBuf); + virXMLFormatElement(buf, "hub", &attrBuf, &childBuf); + + return 0; } @@ -27944,18 +27946,15 @@ virDomainIOMMUDefFormat(virBufferPtr buf, virTristateSwitchTypeToString(iommu->iotlb)); } - if (virXMLFormatElement(&childBuf, "driver", &driverAttrBuf, NULL) < 0) - goto cleanup; + virXMLFormatElement(&childBuf, "driver", &driverAttrBuf, NULL); virBufferAsprintf(&attrBuf, " model=3D'%s'", virDomainIOMMUModelTypeToString(iommu->model)); - if (virXMLFormatElement(buf, "iommu", &attrBuf, &childBuf) < 0) - goto cleanup; + virXMLFormatElement(buf, "iommu", &attrBuf, &childBuf); ret =3D 0; - cleanup: return ret; } @@ -27990,8 +27989,7 @@ virDomainMemtuneFormat(virBufferPtr buf, mem->swap_hard_limit); } - if (virXMLFormatElement(buf, "memtune", NULL, &childBuf) < 0) - goto cleanup; + virXMLFormatElement(buf, "memtune", NULL, &childBuf); virBufferSetChildIndent(&childBuf, buf); @@ -28013,11 +28011,9 @@ virDomainMemtuneFormat(virBufferPtr buf, if (mem->discard) virBufferAddLit(&childBuf, "\n"); - if (virXMLFormatElement(buf, "memoryBacking", NULL, &childBuf) < 0) - goto cleanup; + virXMLFormatElement(buf, "memoryBacking", NULL, &childBuf); ret =3D 0; - cleanup: return ret; } @@ -28044,14 +28040,12 @@ virDomainVsockDefFormat(virBufferPtr buf, } if (vsock->guest_cid !=3D 0) virBufferAsprintf(&cidAttrBuf, " address=3D'%u'", vsock->guest_cid= ); - if (virXMLFormatElement(&childBuf, "cid", &cidAttrBuf, NULL) < 0) - goto cleanup; + virXMLFormatElement(&childBuf, "cid", &cidAttrBuf, NULL); if (virDomainDeviceInfoFormat(&childBuf, &vsock->info, 0) < 0) goto cleanup; - if (virXMLFormatElement(buf, "vsock", &attrBuf, &childBuf) < 0) - goto cleanup; + virXMLFormatElement(buf, "vsock", &attrBuf, &childBuf); ret =3D 0; @@ -28101,7 +28095,9 @@ virDomainDefFormatBlkiotune(virBufferPtr buf, virBufferAddLit(&childrenBuf, "\n"); } - return virXMLFormatElement(buf, "blkiotune", NULL, &childrenBuf); + virXMLFormatElement(buf, "blkiotune", NULL, &childrenBuf); + + return 0; } @@ -28187,8 +28183,7 @@ virDomainDefFormatFeatures(virBufferPtr buf, unit, short_size); } - if (virXMLFormatElement(&childBuf, "smm", &tmpAttrBuf, &tmpChi= ldBuf) < 0) - return -1; + virXMLFormatElement(&childBuf, "smm", &tmpAttrBuf, &tmpChildBu= f); break; @@ -28319,8 +28314,7 @@ virDomainDefFormatFeatures(virBufferPtr buf, virBufferAsprintf(&tmpAttrBuf, " policy=3D'%s'", virDomainCapabilitiesPolicyTypeToString(= def->features[i])); - if (virXMLFormatElement(&childBuf, "capabilities", &tmpAttrBuf= , &tmpChildBuf) < 0) - return -1; + virXMLFormatElement(&childBuf, "capabilities", &tmpAttrBuf, &t= mpChildBuf); break; case VIR_DOMAIN_FEATURE_GIC: @@ -28357,8 +28351,7 @@ virDomainDefFormatFeatures(virBufferPtr buf, def->hpt_maxpagesize); } - if (virXMLFormatElement(&childBuf, "hpt", &tmpAttrBuf, &tmpChi= ldBuf) < 0) - return -1; + virXMLFormatElement(&childBuf, "hpt", &tmpAttrBuf, &tmpChildBu= f); break; case VIR_DOMAIN_FEATURE_MSRS: @@ -28375,7 +28368,8 @@ virDomainDefFormatFeatures(virBufferPtr buf, } } - return virXMLFormatElement(buf, "features", NULL, &childBuf); + virXMLFormatElement(buf, "features", NULL, &childBuf); + return 0; } int diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 71309d9c83..667cc89072 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -2327,8 +2327,7 @@ qemuStorageSourcePrivateDataFormat(virStorageSourcePt= r src, if (src->tlsAlias) virBufferAsprintf(&tmp, "\n", src->tlsAlias= ); - if (virXMLFormatElement(buf, "objects", NULL, &tmp) < 0) - goto cleanup; + virXMLFormatElement(buf, "objects", NULL, &tmp); ret =3D 0; @@ -2461,8 +2460,7 @@ qemuDomainObjPrivateXMLFormatBlockjobFormatSource(vir= BufferPtr buf, virDomainDiskBackingStoreFormat(&childBuf, src, xmlopt, xmlflags) = < 0) return -1; - if (virXMLFormatElement(buf, element, &attrBuf, &childBuf) < 0) - return -1; + virXMLFormatElement(buf, element, &attrBuf, &childBuf); return 0; } @@ -2515,8 +2513,7 @@ qemuDomainObjPrivateXMLFormatBlockjobIterator(void *p= ayload, true) < 0) return -1; - if (virXMLFormatElement(&childBuf, "chains", NULL, &chainsBuf) < 0) - return -1; + virXMLFormatElement(&childBuf, "chains", NULL, &chainsBuf); } switch ((qemuBlockJobType) job->type) { @@ -2559,7 +2556,8 @@ qemuDomainObjPrivateXMLFormatBlockjobIterator(void *p= ayload, break; } - return virXMLFormatElement(data->buf, "blockjob", &attrBuf, &childBuf); + virXMLFormatElement(data->buf, "blockjob", &attrBuf, &childBuf); + return 0; } @@ -2585,7 +2583,8 @@ qemuDomainObjPrivateXMLFormatBlockjobs(virBufferPtr b= uf, &iterdata) < 0) return -1; - return virXMLFormatElement(buf, "blockjobs", &attrBuf, &childBuf); + virXMLFormatElement(buf, "blockjobs", &attrBuf, &childBuf); + return 0; } @@ -2627,8 +2626,7 @@ qemuDomainObjPrivateXMLFormatNBDMigrationSource(virBu= fferPtr buf, VIR_DOMAIN_DEF_FORMAT_STATUS, xmlopt) < = 0) goto cleanup; - if (virXMLFormatElement(buf, "migrationSource", &attrBuf, &childBuf) <= 0) - goto cleanup; + virXMLFormatElement(buf, "migrationSource", &attrBuf, &childBuf); ret =3D 0; @@ -2664,8 +2662,7 @@ qemuDomainObjPrivateXMLFormatNBDMigration(virBufferPt= r buf, priv->driver->= xmlopt) < 0) goto cleanup; - if (virXMLFormatElement(buf, "disk", &attrBuf, &childBuf) < 0) - goto cleanup; + virXMLFormatElement(buf, "disk", &attrBuf, &childBuf); } ret =3D 0; @@ -2714,8 +2711,7 @@ qemuDomainObjPrivateXMLFormatJob(virBufferPtr buf, if (priv->job.migParams) qemuMigrationParamsFormat(&childBuf, priv->job.migParams); - if (virXMLFormatElement(buf, "job", &attrBuf, &childBuf) < 0) - goto cleanup; + virXMLFormatElement(buf, "job", &attrBuf, &childBuf); ret =3D 0; diff --git a/src/util/virsysinfo.c b/src/util/virsysinfo.c index 0714661237..9d013067fe 100644 --- a/src/util/virsysinfo.c +++ b/src/util/virsysinfo.c @@ -1505,10 +1505,7 @@ virSysinfoFormat(virBufferPtr buf, virSysinfoDefPtr = def) virBufferAsprintf(&attrBuf, " type=3D'%s'", type); - if (virXMLFormatElement(buf, "sysinfo", &attrBuf, &childrenBuf) < 0) { - virBufferFreeAndReset(buf); - return -1; - } + virXMLFormatElement(buf, "sysinfo", &attrBuf, &childrenBuf); return 0; } diff --git a/src/util/virxml.c b/src/util/virxml.c index 31e7bb3c73..0e66d1623b 100644 --- a/src/util/virxml.c +++ b/src/util/virxml.c @@ -1371,21 +1371,16 @@ virXMLValidatorFree(virXMLValidatorPtr validator) * formatted. * * Both passed buffers are always consumed and freed. - * - * Returns 0 on success, -1 on error. */ -int +void virXMLFormatElement(virBufferPtr buf, const char *name, virBufferPtr attrBuf, virBufferPtr childBuf) { - int ret =3D -1; - if ((!attrBuf || virBufferUse(attrBuf) =3D=3D 0) && - (!childBuf || virBufferUse(childBuf) =3D=3D 0)) { - return 0; - } + (!childBuf || virBufferUse(childBuf) =3D=3D 0)) + return; virBufferAsprintf(buf, "<%s", name); @@ -1400,11 +1395,8 @@ virXMLFormatElement(virBufferPtr buf, virBufferAddLit(buf, "/>\n"); } - ret =3D 0; - virBufferFreeAndReset(attrBuf); virBufferFreeAndReset(childBuf); - return ret; } diff --git a/src/util/virxml.h b/src/util/virxml.h index dfdc1f73c3..26ab9f9c2d 100644 --- a/src/util/virxml.h +++ b/src/util/virxml.h @@ -215,12 +215,11 @@ virXMLValidateAgainstSchema(const char *schemafile, void virXMLValidatorFree(virXMLValidatorPtr validator); -int +void virXMLFormatElement(virBufferPtr buf, const char *name, virBufferPtr attrBuf, - virBufferPtr childBuf) - G_GNUC_WARN_UNUSED_RESULT; + virBufferPtr childBuf); struct _virXPathContextNodeSave { xmlXPathContextPtr ctxt; --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list