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:
Michal Privoznik 2020-01-31 17:13:25 +01:00
parent 62d75cdcc6
commit 7c541207bb

View File

@ -695,7 +695,7 @@ testDomainStartState(testDriverPtr privconn,
int ret = -1;
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,
dom, NULL) < 0) {