From 695cdc07366f4fed79d9eb02d747430cf766880a Mon Sep 17 00:00:00 2001 From: Matt Coleman Date: Thu, 5 Nov 2020 22:32:44 -0500 Subject: [PATCH] domain_conf: make virDomainLeaseDefFormat() void This function always returns zero, so it might as well be void. Signed-off-by: Matt Coleman Reviewed-by: Michal Privoznik --- src/conf/domain_conf.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index bb65b6d097..32fa01f2c4 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -25223,7 +25223,7 @@ virSecurityDeviceLabelDefFormat(virBufferPtr buf, } -static int +static void virDomainLeaseDefFormat(virBufferPtr buf, virDomainLeaseDefPtr def) { @@ -25237,8 +25237,6 @@ virDomainLeaseDefFormat(virBufferPtr buf, virBufferAddLit(buf, "/>\n"); virBufferAdjustIndent(buf, -2); virBufferAddLit(buf, "\n"); - - return 0; } static void @@ -30275,8 +30273,7 @@ virDomainDefFormatInternalSetRootName(virDomainDefPtr def, return -1; for (n = 0; n < def->nleases; n++) - if (virDomainLeaseDefFormat(buf, def->leases[n]) < 0) - return -1; + virDomainLeaseDefFormat(buf, def->leases[n]); for (n = 0; n < def->nfss; n++) if (virDomainFSDefFormat(buf, def->fss[n], flags) < 0) @@ -31463,7 +31460,8 @@ virDomainDeviceDefCopy(virDomainDeviceDefPtr src, rc = virDomainDiskDefFormat(&buf, src->data.disk, flags, xmlopt); break; case VIR_DOMAIN_DEVICE_LEASE: - rc = virDomainLeaseDefFormat(&buf, src->data.lease); + virDomainLeaseDefFormat(&buf, src->data.lease); + rc = 0; break; case VIR_DOMAIN_DEVICE_FS: rc = virDomainFSDefFormat(&buf, src->data.fs, flags);