mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-09 13:11:36 +00:00
test_driver: Replace virAtomicIntAdd() with g_atomic_int_add()
Instead of calling virAtomicIntAdd(&var, 1); we can call g_atomic_int_add() directly. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
62d75cdcc6
commit
7c541207bb
@ -695,7 +695,7 @@ testDomainStartState(testDriverPtr privconn,
|
|||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|
||||||
virDomainObjSetState(dom, VIR_DOMAIN_RUNNING, reason);
|
virDomainObjSetState(dom, VIR_DOMAIN_RUNNING, reason);
|
||||||
dom->def->id = virAtomicIntAdd(&privconn->nextDomID, 1);
|
dom->def->id = g_atomic_int_add(&privconn->nextDomID, 1);
|
||||||
|
|
||||||
if (virDomainObjSetDefTransient(privconn->xmlopt,
|
if (virDomainObjSetDefTransient(privconn->xmlopt,
|
||||||
dom, NULL) < 0) {
|
dom, NULL) < 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user