[PATCH 1/7] test_driver: Replace virAtomicIntAdd() with virAtomicIntInc()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Instead of calling virAtomicIntAdd(&var, 1); we can call
virAtomicIntInc(&var) directly.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 src/test/test_driver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index 47c1fc588f..6f617592f3 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -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 = virAtomicIntInc(&privconn->nextDomID);
 
     if (virDomainObjSetDefTransient(privconn->xmlopt,
                                     dom, NULL) < 0) {
-- 
2.24.1





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux