mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
conf: minor indentation cleanups
On few places there are too many levels of indentation when some of them can be fixed with negating the option they are in or omitting useless condition altogether.
This commit is contained in:
parent
b72c97e732
commit
7affb25be9
@ -9181,9 +9181,11 @@ static virDomainDefPtr virDomainDefParseXML(virCapsPtr caps,
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < def->vcpus; i++) {
|
for (i = 0; i < def->vcpus; i++) {
|
||||||
if (!virDomainVcpuPinIsDuplicate(def->cputune.vcpupin,
|
if (virDomainVcpuPinIsDuplicate(def->cputune.vcpupin,
|
||||||
def->cputune.nvcpupin,
|
def->cputune.nvcpupin,
|
||||||
i)) {
|
i))
|
||||||
|
continue;
|
||||||
|
|
||||||
virDomainVcpuPinDefPtr vcpupin = NULL;
|
virDomainVcpuPinDefPtr vcpupin = NULL;
|
||||||
|
|
||||||
if (VIR_ALLOC(vcpupin) < 0) {
|
if (VIR_ALLOC(vcpupin) < 0) {
|
||||||
@ -9197,7 +9199,6 @@ static virDomainDefPtr virDomainDefParseXML(virCapsPtr caps,
|
|||||||
def->cputune.vcpupin[def->cputune.nvcpupin++] = vcpupin;
|
def->cputune.vcpupin[def->cputune.nvcpupin++] = vcpupin;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if ((n = virXPathNodeSet("./cputune/emulatorpin", ctxt, &nodes)) < 0) {
|
if ((n = virXPathNodeSet("./cputune/emulatorpin", ctxt, &nodes)) < 0) {
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||||
@ -14100,7 +14101,6 @@ virDomainDefFormatInternal(virDomainDefPtr def,
|
|||||||
"</emulator_quota>\n",
|
"</emulator_quota>\n",
|
||||||
def->cputune.emulator_quota);
|
def->cputune.emulator_quota);
|
||||||
|
|
||||||
if (def->cputune.vcpupin) {
|
|
||||||
for (i = 0; i < def->cputune.nvcpupin; i++) {
|
for (i = 0; i < def->cputune.nvcpupin; i++) {
|
||||||
/* Ignore the vcpupin which inherit from "cpuset"
|
/* Ignore the vcpupin which inherit from "cpuset"
|
||||||
* of "<vcpu>."
|
* of "<vcpu>."
|
||||||
@ -14125,7 +14125,6 @@ virDomainDefFormatInternal(virDomainDefPtr def,
|
|||||||
virBufferAsprintf(buf, "cpuset='%s'/>\n", cpumask);
|
virBufferAsprintf(buf, "cpuset='%s'/>\n", cpumask);
|
||||||
VIR_FREE(cpumask);
|
VIR_FREE(cpumask);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (def->cputune.emulatorpin) {
|
if (def->cputune.emulatorpin) {
|
||||||
virBufferAsprintf(buf, " <emulatorpin ");
|
virBufferAsprintf(buf, " <emulatorpin ");
|
||||||
|
Loading…
Reference in New Issue
Block a user