Instead of calling virAtomicIntAdd(&var, 1); we can call
virAtomicIntInc(&var) directly.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
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