Remove virDomainRNGInsert

It was just a useless wrapper around VIR_APPEND_ELEMENT*.
This commit is contained in:
Jiri Denemark 2016-05-17 13:08:34 +02:00
parent c4111209b8
commit d8d4b9d957
5 changed files with 2 additions and 19 deletions

View File

@ -14039,18 +14039,6 @@ virDomainChrRemove(virDomainDefPtr vmdef,
}
int
virDomainRNGInsert(virDomainDefPtr def,
virDomainRNGDefPtr rng,
bool inplace)
{
if (inplace)
return VIR_APPEND_ELEMENT_INPLACE(def->rngs, def->nrngs, rng);
else
return VIR_APPEND_ELEMENT(def->rngs, def->nrngs, rng);
}
ssize_t
virDomainRNGFind(virDomainDefPtr def,
virDomainRNGDefPtr rng)

View File

@ -2909,9 +2909,6 @@ virDomainChrDefPtr
virDomainChrRemove(virDomainDefPtr vmdef,
virDomainChrDefPtr chr);
int virDomainRNGInsert(virDomainDefPtr def,
virDomainRNGDefPtr rng,
bool inplace);
ssize_t virDomainRNGFind(virDomainDefPtr def, virDomainRNGDefPtr rng);
virDomainRNGDefPtr virDomainRNGRemove(virDomainDefPtr def, size_t idx);

View File

@ -424,7 +424,6 @@ virDomainRedirdevBusTypeToString;
virDomainRNGBackendTypeToString;
virDomainRNGDefFree;
virDomainRNGFind;
virDomainRNGInsert;
virDomainRNGModelTypeToString;
virDomainRNGRemove;
virDomainRunningReasonTypeFromString;

View File

@ -7914,7 +7914,7 @@ qemuDomainAttachDeviceConfig(virQEMUCapsPtr qemuCaps,
return -1;
}
if (virDomainRNGInsert(vmdef, dev->data.rng, false) < 0)
if (VIR_APPEND_ELEMENT(vmdef->rngs, vmdef->nrngs, dev->data.rng) < 0)
return -1;
dev->data.rng = NULL;

View File

@ -1666,8 +1666,7 @@ qemuDomainAttachRNGDevice(virQEMUDriverPtr driver,
goto cleanup;
}
if (virDomainRNGInsert(vm->def, rng, true) < 0)
goto audit;
ignore_value(VIR_APPEND_ELEMENT_INPLACE(vm->def->rngs, vm->def->nrngs, rng));
ret = 0;