diff --git a/src/bhyve/bhyve_command.c b/src/bhyve/bhyve_command.c index 8ea76cee2e..48336ffa1b 100644 --- a/src/bhyve/bhyve_command.c +++ b/src/bhyve/bhyve_command.c @@ -227,9 +227,6 @@ bhyveBuildAHCIControllerArgStr(const virDomainDef *def, virBufferFreeAndReset(&device); } - if (virBufferCheckError(&buf) < 0) - goto error; - virCommandAddArg(cmd, "-s"); virCommandAddArgFormat(cmd, "%d:0,ahci%s", controller->info.addr.pci.slot, diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c index a2c8185c45..d40ae1cd23 100644 --- a/src/bhyve/bhyve_driver.c +++ b/src/bhyve/bhyve_driver.c @@ -258,8 +258,6 @@ bhyveConnectGetSysinfo(virConnectPtr conn, unsigned int flags) if (virSysinfoFormat(&buf, privconn->hostsysinfo) < 0) return NULL; - if (virBufferCheckError(&buf) < 0) - return NULL; return virBufferContentAndReset(&buf); } @@ -743,9 +741,6 @@ bhyveConnectDomainXMLToNative(virConnectPtr conn, virBufferAdd(&buf, virCommandToString(cmd, false), -1); - if (virBufferCheckError(&buf) < 0) - goto cleanup; - ret = virBufferContentAndReset(&buf); cleanup: diff --git a/src/conf/capabilities.c b/src/conf/capabilities.c index 697d464fe9..953464b09d 100644 --- a/src/conf/capabilities.c +++ b/src/conf/capabilities.c @@ -734,10 +734,6 @@ virCapabilitiesDomainDataLookupInternal(virCapsPtr caps, if (virBufferCurrentContent(&buf) && !virBufferCurrentContent(&buf)[0]) virBufferAsprintf(&buf, "%s", _("any configuration")); - if (virBufferCheckError(&buf) < 0) { - virBufferFreeAndReset(&buf); - goto error; - } virReportError(VIR_ERR_INVALID_ARG, _("could not find capabilities for %s"), @@ -930,9 +926,6 @@ virCapabilitiesFormatResctrlMonitor(virBufferPtr buf, monitor->features[i]); } - if (virBufferCheckError(&childrenBuf) < 0) - return -1; - virBufferAddBuffer(buf, &childrenBuf); virBufferAddLit(buf, "\n"); @@ -1014,9 +1007,6 @@ virCapabilitiesFormatCaches(virBufferPtr buf, controls->max_allocation); } - if (virBufferCheckError(&childrenBuf) < 0) - return -1; - if (virBufferUse(&childrenBuf)) { virBufferAddLit(buf, ">\n"); virBufferAddBuffer(buf, &childrenBuf); @@ -1068,9 +1058,6 @@ virCapabilitiesFormatMemoryBandwidth(virBufferPtr buf, control->granularity, control->min, control->max_allocation); - if (virBufferCheckError(&childrenBuf) < 0) - return -1; - if (virBufferUse(&childrenBuf)) { virBufferAddLit(buf, ">\n"); virBufferAddBuffer(buf, &childrenBuf); @@ -1367,9 +1354,6 @@ virCapabilitiesFormatXML(virCapsPtr caps) virBufferAdjustIndent(&buf, -2); virBufferAddLit(&buf, "\n"); - if (virBufferCheckError(&buf) < 0) - return NULL; - return virBufferContentAndReset(&buf); error: diff --git a/src/conf/checkpoint_conf.c b/src/conf/checkpoint_conf.c index 5b2723332d..36076c13df 100644 --- a/src/conf/checkpoint_conf.c +++ b/src/conf/checkpoint_conf.c @@ -496,9 +496,6 @@ virDomainCheckpointDefFormatInternal(virBufferPtr buf, virBufferAdjustIndent(buf, -2); virBufferAddLit(buf, "\n"); - if (virBufferCheckError(buf) < 0) - goto error; - return 0; error: diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c index 1d9feb2f0a..2b644638a7 100644 --- a/src/conf/cpu_conf.c +++ b/src/conf/cpu_conf.c @@ -668,9 +668,6 @@ virCPUDefFormat(virCPUDefPtr def, if (virCPUDefFormatBufFull(&buf, def, numa) < 0) goto cleanup; - if (virBufferCheckError(&buf) < 0) - goto cleanup; - return virBufferContentAndReset(&buf); cleanup: @@ -731,10 +728,6 @@ virCPUDefFormatBufFull(virBufferPtr buf, if (virDomainNumaDefCPUFormatXML(&childrenBuf, numa) < 0) goto cleanup; - if (virBufferCheckError(&attributeBuf) < 0 || - virBufferCheckError(&childrenBuf) < 0) - goto cleanup; - /* Put it all together */ if (virBufferUse(&attributeBuf) || virBufferUse(&childrenBuf)) { virBufferAddLit(buf, "\n"); - virBufferCheckError(&buf); return virBufferContentAndReset(&buf); } diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 0f9fcf43e8..0859fece4c 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -24848,9 +24848,6 @@ virDomainFSDefFormat(virBufferPtr buf, virDomainVirtioOptionsFormat(&driverBuf, def->virtio); - if (virBufferCheckError(&driverBuf) < 0) - goto cleanup; - if (virBufferUse(&driverBuf)) { virBufferAddLit(buf, "virtio); - if (virBufferCheckError(&buf) < 0) - return -1; - *outstr = virBufferContentAndReset(&buf); return 0; } @@ -26077,9 +26065,6 @@ virDomainSmartcardDefFormat(virBufferPtr buf, if (virDomainDeviceInfoFormat(&childBuf, &def->info, flags) < 0) goto cleanup; - if (virBufferCheckError(&childBuf) < 0) - goto cleanup; - virBufferAsprintf(buf, "type == VIR_DOMAIN_SMARTCARD_TYPE_PASSTHROUGH && virDomainChrAttrsDefFormat(buf, def->data.passthru, false) < 0) { @@ -26190,9 +26175,6 @@ virDomainSoundDefFormat(virBufferPtr buf, if (virDomainDeviceInfoFormat(&childBuf, &def->info, flags) < 0) goto cleanup; - if (virBufferCheckError(&childBuf) < 0) - goto cleanup; - virBufferAsprintf(buf, "\n"); @@ -26578,8 +26560,6 @@ virDomainVideoDefFormat(virBufferPtr buf, virBufferAddLit(buf, "