From nobody Mon Feb 9 03:00:04 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1580539027227799.5600695788942; Fri, 31 Jan 2020 22:37:07 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-1-SlVucXPTOoGRVIYfE9bsbA-1; Sat, 01 Feb 2020 01:36:09 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2606A107ACC5; Sat, 1 Feb 2020 06:36:04 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 003C010840DF; Sat, 1 Feb 2020 06:36:03 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id A105D85CF5; Sat, 1 Feb 2020 06:36:03 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0116Xtja012457 for ; Sat, 1 Feb 2020 01:33:55 -0500 Received: by smtp.corp.redhat.com (Postfix) id B3A2584791; Sat, 1 Feb 2020 06:33:55 +0000 (UTC) Received: from localhost.localdomain (ovpn-204-34.brq.redhat.com [10.40.204.34]) by smtp.corp.redhat.com (Postfix) with ESMTP id 355FC77932 for ; Sat, 1 Feb 2020 06:33:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580539026; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=ToemGnTvuyV2jwnlRd34lTmg6ruQDAy1RvZL/4DDzIk=; b=MbYGQ98MxuqWPWdZY2u3+fs57xQtkAz0TSwphnGJkz8v7G5fWNtwbg4kKCz02U0cWnhzo5 E8kI5mou0bB9XriDMW+EzITGItued3apQzHaqGMS4V2FkEIsqLuHYYS72xJuAV0rVLra2i Mpk7w5rr3/hZ7Hj1fPaSSTMbLhSWYmo= From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 1/7] test_driver: Replace virAtomicIntAdd() with virAtomicIntInc() Date: Sat, 1 Feb 2020 07:33:43 +0100 Message-Id: <7af746a747506a7057348429f64fb7a92d04dd6d.1580538782.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: SlVucXPTOoGRVIYfE9bsbA-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Instead of calling virAtomicIntAdd(&var, 1); we can call virAtomicIntInc(&var) directly. Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- 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 =3D -1; =20 virDomainObjSetState(dom, VIR_DOMAIN_RUNNING, reason); - dom->def->id =3D virAtomicIntAdd(&privconn->nextDomID, 1); + dom->def->id =3D virAtomicIntInc(&privconn->nextDomID); =20 if (virDomainObjSetDefTransient(privconn->xmlopt, dom, NULL) < 0) { --=20 2.24.1