]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
test_driver: Replace virAtomicIntAdd() with g_atomic_int_add()
authorMichal Privoznik <mprivozn@redhat.com>
Fri, 31 Jan 2020 16:13:25 +0000 (17:13 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Sun, 2 Feb 2020 15:35:20 +0000 (16:35 +0100)
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>
src/test/test_driver.c

index 47c1fc588f4280fffc5dfcf262a640880b5ee07e..261c1537970cc4ee5c39c7e8056f5887f163ebb4 100644 (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) {