From nobody Sun Apr 28 21:17:36 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 14968254454211018.4881837942075; Wed, 7 Jun 2017 01:50:45 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7D86980474; Wed, 7 Jun 2017 08:50:42 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4D6E8757BF; Wed, 7 Jun 2017 08:50:42 +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 6C91D180BAFA; Wed, 7 Jun 2017 08:50:41 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v578l8tR006181 for ; Wed, 7 Jun 2017 04:47:08 -0400 Received: by smtp.corp.redhat.com (Postfix) id 2F4BA7FDF0; Wed, 7 Jun 2017 08:47:08 +0000 (UTC) Received: from mx1.redhat.com (ext-mx01.extmail.prod.ext.phx2.redhat.com [10.5.110.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 15B9017CF2 for ; Wed, 7 Jun 2017 08:46:56 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id ED19381243 for ; Wed, 7 Jun 2017 08:46:55 +0000 (UTC) Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v578ihIh060697 for ; Wed, 7 Jun 2017 04:46:55 -0400 Received: from e06smtp15.uk.ibm.com (e06smtp15.uk.ibm.com [195.75.94.111]) by mx0a-001b2d01.pphosted.com with ESMTP id 2axa5129tc-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 07 Jun 2017 04:46:55 -0400 Received: from localhost by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 7 Jun 2017 09:46:53 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp15.uk.ibm.com (192.168.101.145) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 7 Jun 2017 09:46:51 +0100 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v578ko2O39780486; Wed, 7 Jun 2017 08:46:50 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F1C785204F; Wed, 7 Jun 2017 08:43:41 +0100 (BST) Received: from marc-ibm.emea.ibm.com (unknown [9.145.4.116]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id 35B2252047; Wed, 7 Jun 2017 08:43:41 +0100 (BST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 7D86980474 Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=linux.vnet.ibm.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 7D86980474 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com ED19381243 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=linux.vnet.ibm.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=none smtp.mailfrom=mhartmay@linux.vnet.ibm.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com ED19381243 From: Marc Hartmayer To: Libvirt Mailing List Date: Wed, 7 Jun 2017 10:46:39 +0200 In-Reply-To: <20170607084641.27722-1-mhartmay@linux.vnet.ibm.com> References: <20170607084641.27722-1-mhartmay@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 17060708-0020-0000-0000-000003817FFD X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17060708-0021-0000-0000-000041FC6A9E Message-Id: <20170607084641.27722-2-mhartmay@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-06-07_07:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1706070159 X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 203 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 07 Jun 2017 08:46:56 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 07 Jun 2017 08:46:56 +0000 (UTC) for IP:'148.163.156.1' DOMAIN:'mx0a-001b2d01.pphosted.com' HELO:'mx0a-001b2d01.pphosted.com' FROM:'mhartmay@linux.vnet.ibm.com' RCPT:'' X-RedHat-Spam-Score: -0.9 (BAYES_50, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2) 148.163.156.1 mx0a-001b2d01.pphosted.com 148.163.156.1 mx0a-001b2d01.pphosted.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.25 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: Marc Hartmayer Subject: [libvirt] [PATCH 1/3] rpc: first allocate the memory and then set the count 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Wed, 07 Jun 2017 08:50:43 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski Reviewed-by: Bjoern Walk Reviewed-by: John Ferlan --- src/rpc/virnetclientprogram.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rpc/virnetclientprogram.c b/src/rpc/virnetclientprogram.c index e620dec..c9d57ec 100644 --- a/src/rpc/virnetclientprogram.c +++ b/src/rpc/virnetclientprogram.c @@ -296,9 +296,9 @@ int virNetClientProgramCall(virNetClientProgramPtr prog, msg->header.type =3D noutfds ? VIR_NET_CALL_WITH_FDS : VIR_NET_CALL; msg->header.serial =3D serial; msg->header.proc =3D proc; - msg->nfds =3D noutfds; - if (VIR_ALLOC_N(msg->fds, msg->nfds) < 0) + if (VIR_ALLOC_N(msg->fds, noutfds) < 0) goto error; + msg->nfds =3D noutfds; for (i =3D 0; i < msg->nfds; i++) msg->fds[i] =3D -1; for (i =3D 0; i < msg->nfds; i++) { --=20 2.5.5 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Apr 28 21:17:36 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1496825439457420.4661819135822; Wed, 7 Jun 2017 01:50:39 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1B66A83F42; Wed, 7 Jun 2017 08:50:38 +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 EC31360465; Wed, 7 Jun 2017 08:50:37 +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 A03D041F50; Wed, 7 Jun 2017 08:50:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v578l7xG006176 for ; Wed, 7 Jun 2017 04:47:07 -0400 Received: by smtp.corp.redhat.com (Postfix) id C72C98318F; Wed, 7 Jun 2017 08:47:07 +0000 (UTC) Received: from mx1.redhat.com (ext-mx05.extmail.prod.ext.phx2.redhat.com [10.5.110.29]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BFA1083195 for ; Wed, 7 Jun 2017 08:47:01 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 072613DE3C for ; Wed, 7 Jun 2017 08:47:00 +0000 (UTC) Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v578hrNY028194 for ; Wed, 7 Jun 2017 04:46:59 -0400 Received: from e06smtp11.uk.ibm.com (e06smtp11.uk.ibm.com [195.75.94.107]) by mx0a-001b2d01.pphosted.com with ESMTP id 2axcmp4sq4-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 07 Jun 2017 04:46:59 -0400 Received: from localhost by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 7 Jun 2017 09:46:56 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp11.uk.ibm.com (192.168.101.141) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 7 Jun 2017 09:46:53 +0100 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v578kr9A39059534; Wed, 7 Jun 2017 08:46:53 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3951B52043; Wed, 7 Jun 2017 08:43:44 +0100 (BST) Received: from marc-ibm.emea.ibm.com (unknown [9.145.4.116]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id 5851052045; Wed, 7 Jun 2017 08:43:43 +0100 (BST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 1B66A83F42 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=linux.vnet.ibm.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 1B66A83F42 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 072613DE3C Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=linux.vnet.ibm.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=none smtp.mailfrom=mhartmay@linux.vnet.ibm.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 072613DE3C From: Marc Hartmayer To: Libvirt Mailing List Date: Wed, 7 Jun 2017 10:46:40 +0200 In-Reply-To: <20170607084641.27722-1-mhartmay@linux.vnet.ibm.com> References: <20170607084641.27722-1-mhartmay@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 17060708-0040-0000-0000-000003C37DAD X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17060708-0041-0000-0000-0000205B54E5 Message-Id: <20170607084641.27722-3-mhartmay@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-06-07_07:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1706070159 X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 203 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Wed, 07 Jun 2017 08:47:00 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Wed, 07 Jun 2017 08:47:00 +0000 (UTC) for IP:'148.163.156.1' DOMAIN:'mx0a-001b2d01.pphosted.com' HELO:'mx0a-001b2d01.pphosted.com' FROM:'mhartmay@linux.vnet.ibm.com' RCPT:'' X-RedHat-Spam-Score: -0.9 (BAYES_50, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2) 148.163.156.1 mx0a-001b2d01.pphosted.com 148.163.156.1 mx0a-001b2d01.pphosted.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.29 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Cc: Marc Hartmayer Subject: [libvirt] [PATCH 2/3] qemu: add a comment for mon->watch 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 07 Jun 2017 08:50:38 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Add a comment for mon->watch to make clear what's the purpose of this value. Signed-off-by: Marc Hartmayer Reviewed-by: Bjoern Walk Reviewed-by: John Ferlan --- src/qemu/qemu_monitor.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index a2de1a6..5c29b37 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -61,6 +61,12 @@ struct _qemuMonitor { virCond notify; =20 int fd; + + /* Represents the watch number to be used for updating and + * unregistering the monitor @fd for events in the event loop: + * > 0: valid watch number + * =3D 0: not registered + * < 0: an error occurred during the registration of @fd */ int watch; int hasSendFD; int willhangup; --=20 2.5.5 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Apr 28 21:17:36 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1496825233816202.0524195790623; Wed, 7 Jun 2017 01:47:13 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4DF09DC8FB; Wed, 7 Jun 2017 08:47:12 +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 0846383198; Wed, 7 Jun 2017 08:47:12 +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 6C0F541287; Wed, 7 Jun 2017 08:47:11 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v578l9rv006187 for ; Wed, 7 Jun 2017 04:47:09 -0400 Received: by smtp.corp.redhat.com (Postfix) id A480F777C2; Wed, 7 Jun 2017 08:47:09 +0000 (UTC) Received: from mx1.redhat.com (ext-mx10.extmail.prod.ext.phx2.redhat.com [10.5.110.39]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9B200777D7 for ; Wed, 7 Jun 2017 08:47:03 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8E97C5AFD9 for ; Wed, 7 Jun 2017 08:47:01 +0000 (UTC) Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v578hsTA084199 for ; Wed, 7 Jun 2017 04:47:01 -0400 Received: from e06smtp11.uk.ibm.com (e06smtp11.uk.ibm.com [195.75.94.107]) by mx0a-001b2d01.pphosted.com with ESMTP id 2axccnw91c-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 07 Jun 2017 04:47:00 -0400 Received: from localhost by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 7 Jun 2017 09:46:58 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp11.uk.ibm.com (192.168.101.141) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 7 Jun 2017 09:46:56 +0100 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v578kt0F35848220; Wed, 7 Jun 2017 08:46:55 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D31D952045; Wed, 7 Jun 2017 08:43:46 +0100 (BST) Received: from marc-ibm.emea.ibm.com (unknown [9.145.4.116]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id 8259C5203F; Wed, 7 Jun 2017 08:43:45 +0100 (BST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 4DF09DC8FB Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=linux.vnet.ibm.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 4DF09DC8FB DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 8E97C5AFD9 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=linux.vnet.ibm.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=none smtp.mailfrom=mhartmay@linux.vnet.ibm.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 8E97C5AFD9 From: Marc Hartmayer To: Libvirt Mailing List Date: Wed, 7 Jun 2017 10:46:41 +0200 In-Reply-To: <20170607084641.27722-1-mhartmay@linux.vnet.ibm.com> References: <20170607084641.27722-1-mhartmay@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 17060708-0040-0000-0000-000003C37DB1 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17060708-0041-0000-0000-0000205B54E7 Message-Id: <20170607084641.27722-4-mhartmay@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-06-07_07:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=2 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1706070159 X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 203 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 07 Jun 2017 08:47:01 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 07 Jun 2017 08:47:01 +0000 (UTC) for IP:'148.163.158.5' DOMAIN:'mx0b-001b2d01.pphosted.com' HELO:'mx0a-001b2d01.pphosted.com' FROM:'mhartmay@linux.vnet.ibm.com' RCPT:'' X-RedHat-Spam-Score: -0.9 (BAYES_50, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2) 148.163.158.5 mx0b-001b2d01.pphosted.com 148.163.158.5 mx0b-001b2d01.pphosted.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.39 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: Marc Hartmayer Subject: [libvirt] [PATCH 3/3] Use ATTRIBUTE_FALLTHROUGH 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 07 Jun 2017 08:47:13 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Use ATTRIBUTE_FALLTHROUGH, introduced by commit 5d84f5961b8e28e802f600bb2d2c6903e219092e, instead of comments to indicate that the fall through is an intentional behavior. Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski Reviewed-by: Bjoern Walk Reviewed-by: John Ferlan --- src/conf/domain_conf.c | 2 +- src/conf/nwfilter_conf.c | 14 +++++++------- src/cpu/cpu_ppc64.c | 2 +- src/libvirt-domain.c | 2 +- src/libxl/libxl_conf.c | 2 +- src/network/leaseshelper.c | 4 ++-- src/qemu/qemu_command.c | 2 +- src/qemu/qemu_domain.c | 4 ++-- src/qemu/qemu_driver.c | 4 ++-- src/qemu/qemu_hotplug.c | 4 ++-- src/qemu/qemu_migration.c | 2 +- src/remote/remote_driver.c | 2 +- src/rpc/virnetservermdns.c | 2 +- src/storage/storage_driver.c | 2 +- src/util/virconf.c | 2 +- src/util/virhashcode.c | 6 +++--- src/util/virnetdevbridge.c | 1 + src/util/virutil.c | 10 +++++----- tools/virsh-domain.c | 4 ++-- tools/virsh.c | 2 +- tools/virt-admin.c | 2 +- 21 files changed, 38 insertions(+), 37 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 958a5b7..560c626 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -17524,7 +17524,7 @@ virDomainDefParseXML(xmlDocPtr xml, def->apic_eoi =3D eoi; VIR_FREE(tmp); } - /* fallthrough */ + ATTRIBUTE_FALLTHROUGH; case VIR_DOMAIN_FEATURE_ACPI: case VIR_DOMAIN_FEATURE_PAE: case VIR_DOMAIN_FEATURE_VIRIDIAN: diff --git a/src/conf/nwfilter_conf.c b/src/conf/nwfilter_conf.c index 032700c..9be0724 100644 --- a/src/conf/nwfilter_conf.c +++ b/src/conf/nwfilter_conf.c @@ -1852,7 +1852,7 @@ virNWFilterRuleDetailsParse(xmlNodePtr node, switch (datatype) { case DATATYPE_UINT8_HEX: base =3D 16; - /* fallthrough */ + ATTRIBUTE_FALLTHROUGH; case DATATYPE_UINT8: if (virStrToLong_ui(prop, NULL, base, &uint_va= l) >=3D 0) { if (uint_val <=3D 0xff) { @@ -1869,7 +1869,7 @@ virNWFilterRuleDetailsParse(xmlNodePtr node, =20 case DATATYPE_UINT16_HEX: base =3D 16; - /* fallthrough */ + ATTRIBUTE_FALLTHROUGH; case DATATYPE_UINT16: if (virStrToLong_ui(prop, NULL, base, &uint_va= l) >=3D 0) { if (uint_val <=3D 0xffff) { @@ -1886,7 +1886,7 @@ virNWFilterRuleDetailsParse(xmlNodePtr node, =20 case DATATYPE_UINT32_HEX: base =3D 16; - /* fallthrough */ + ATTRIBUTE_FALLTHROUGH; case DATATYPE_UINT32: if (virStrToLong_ui(prop, NULL, base, &uint_va= l) >=3D 0) { item->u.u32 =3D uint_val; @@ -2120,7 +2120,7 @@ virNWFilterRuleValidate(virNWFilterRuleDefPtr rule) portData =3D &rule->p.ipHdrFilter.portData; protocol =3D "IP"; dataProtocolID =3D &rule->p.ipHdrFilter.ipHdr.dataProtocolID; - /* fall through */ + ATTRIBUTE_FALLTHROUGH; case VIR_NWFILTER_RULE_PROTOCOL_IPV6: if (portData =3D=3D NULL) { portData =3D &rule->p.ipv6HdrFilter.portData; @@ -3030,7 +3030,7 @@ virNWFilterRuleDefDetailsFormat(virBufferPtr buf, =20 case DATATYPE_UINT8_HEX: asHex =3D true; - /* fallthrough */ + ATTRIBUTE_FALLTHROUGH; case DATATYPE_IPMASK: case DATATYPE_IPV6MASK: /* display all masks in CIDR format */ @@ -3041,7 +3041,7 @@ virNWFilterRuleDefDetailsFormat(virBufferPtr buf, =20 case DATATYPE_UINT16_HEX: asHex =3D true; - /* fallthrough */ + ATTRIBUTE_FALLTHROUGH; case DATATYPE_UINT16: virBufferAsprintf(buf, asHex ? "0x%x" : "%d", item->u.u16); @@ -3049,7 +3049,7 @@ virNWFilterRuleDefDetailsFormat(virBufferPtr buf, =20 case DATATYPE_UINT32_HEX: asHex =3D true; - /* fallthrough */ + ATTRIBUTE_FALLTHROUGH; case DATATYPE_UINT32: virBufferAsprintf(buf, asHex ? "0x%x" : "%u", item->u.u32); diff --git a/src/cpu/cpu_ppc64.c b/src/cpu/cpu_ppc64.c index f64592b..b68540d 100644 --- a/src/cpu/cpu_ppc64.c +++ b/src/cpu/cpu_ppc64.c @@ -576,7 +576,7 @@ ppc64Compute(virCPUDefPtr host, ret =3D tmp; goto cleanup; } - /* fallthrough */ + ATTRIBUTE_FALLTHROUGH; =20 case VIR_CPU_MODE_HOST_PASSTHROUGH: /* host-model and host-passthrough: diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 310b91b..0298d0a 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-domain.c @@ -7955,7 +7955,7 @@ virDomainSetMetadata(virDomainPtr domain, "newlines")); goto error; } - /* fallthrough */ + ATTRIBUTE_FALLTHROUGH; case VIR_DOMAIN_METADATA_DESCRIPTION: virCheckNullArgGoto(uri, error); virCheckNullArgGoto(key, error); diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c index 886dc62..81db634 100644 --- a/src/libxl/libxl_conf.c +++ b/src/libxl/libxl_conf.c @@ -1048,7 +1048,7 @@ libxlMakeNic(virDomainDefPtr def, if (VIR_STRDUP(x_nic->bridge, virDomainNetGetActualBridgeName(l_nic)) < 0) goto cleanup; - /* fallthrough */ + ATTRIBUTE_FALLTHROUGH; case VIR_DOMAIN_NET_TYPE_ETHERNET: if (VIR_STRDUP(x_nic->script, l_nic->script) < 0) goto cleanup; diff --git a/src/network/leaseshelper.c b/src/network/leaseshelper.c index a0262dd..b4d87ee 100644 --- a/src/network/leaseshelper.c +++ b/src/network/leaseshelper.c @@ -195,7 +195,7 @@ main(int argc, char **argv) if (!lease_new) break; =20 - /* fallthrough */ + ATTRIBUTE_FALLTHROUGH; case VIR_LEASE_ACTION_DEL: /* Delete the corresponding lease, if it already exists */ delete =3D true; @@ -232,7 +232,7 @@ main(int argc, char **argv) } lease_new =3D NULL; =20 - /* fallthrough */ + ATTRIBUTE_FALLTHROUGH; case VIR_LEASE_ACTION_DEL: if (!(leases_str =3D virJSONValueToString(leases_array_new, true))= ) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 015af10..060b4ee 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -9049,7 +9049,7 @@ qemuBuildShmemCommandLine(virLogManagerPtr logManager, virCommandAddArgList(cmd, "-object", devstr, NULL); VIR_FREE(devstr); =20 - /* fall-through */ + ATTRIBUTE_FALLTHROUGH; case VIR_DOMAIN_SHMEM_MODEL_IVSHMEM_DOORBELL: devstr =3D qemuBuildShmemDevStr(def, shmem, qemuCaps); break; diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 6986324..2c9aa70 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -166,7 +166,7 @@ qemuDomainAsyncJobPhaseToString(qemuDomainAsyncJob job, case QEMU_ASYNC_JOB_START: case QEMU_ASYNC_JOB_NONE: case QEMU_ASYNC_JOB_LAST: - ; /* fall through */ + ATTRIBUTE_FALLTHROUGH; } =20 return "none"; @@ -190,7 +190,7 @@ qemuDomainAsyncJobPhaseFromString(qemuDomainAsyncJob jo= b, case QEMU_ASYNC_JOB_START: case QEMU_ASYNC_JOB_NONE: case QEMU_ASYNC_JOB_LAST: - ; /* fall through */ + ATTRIBUTE_FALLTHROUGH; } =20 if (STREQ(phase, "none")) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index f0cdea6..c293911 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -4063,7 +4063,7 @@ processGuestPanicEvent(virQEMUDriverPtr driver, case VIR_DOMAIN_LIFECYCLE_CRASH_COREDUMP_DESTROY: if (doCoreDumpToAutoDumpPath(driver, vm, VIR_DUMP_MEMORY_ONLY) < 0) goto endjob; - /* fall through */ + ATTRIBUTE_FALLTHROUGH; =20 case VIR_DOMAIN_LIFECYCLE_CRASH_DESTROY: qemuProcessStop(driver, vm, VIR_DOMAIN_SHUTOFF_CRASHED, @@ -4080,7 +4080,7 @@ processGuestPanicEvent(virQEMUDriverPtr driver, case VIR_DOMAIN_LIFECYCLE_CRASH_COREDUMP_RESTART: if (doCoreDumpToAutoDumpPath(driver, vm, VIR_DUMP_MEMORY_ONLY) < 0) goto endjob; - /* fall through */ + ATTRIBUTE_FALLTHROUGH; =20 case VIR_DOMAIN_LIFECYCLE_CRASH_RESTART: qemuDomainSetFakeReboot(driver, vm, true); diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 4a7d997..85e4de8 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -2741,7 +2741,7 @@ qemuDomainAttachShmemDevice(virQEMUDriverPtr driver, virReportError(VIR_ERR_OPERATION_UNSUPPORTED, _("live attach of shmem model '%s' is not supported= "), virDomainShmemModelTypeToString(shmem->model)); - /* fall-through */ + ATTRIBUTE_FALLTHROUGH; case VIR_DOMAIN_SHMEM_MODEL_LAST: return -1; } @@ -4941,7 +4941,7 @@ qemuDomainDetachShmemDevice(virQEMUDriverPtr driver, virReportError(VIR_ERR_OPERATION_UNSUPPORTED, _("live detach of shmem model '%s' is not supported= "), virDomainShmemModelTypeToString(shmem->model)); - /* fall-through */ + ATTRIBUTE_FALLTHROUGH; case VIR_DOMAIN_SHMEM_MODEL_LAST: return -1; } diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 3c0d7e9..4bfc740 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -676,7 +676,7 @@ qemuMigrationDriveMirrorCancelled(virQEMUDriverPtr driv= er, disk->dst); failed =3D true; } - /* fallthrough */ + ATTRIBUTE_FALLTHROUGH; case VIR_DOMAIN_BLOCK_JOB_CANCELED: case VIR_DOMAIN_BLOCK_JOB_COMPLETED: qemuBlockJobSyncEnd(driver, vm, asyncJob, disk); diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index 9c3ec2c..b452e8b 100644 --- a/src/remote/remote_driver.c +++ b/src/remote/remote_driver.c @@ -947,7 +947,7 @@ doRemoteOpen(virConnectPtr conn, goto failed; #endif =20 - /*FALLTHROUGH*/ + ATTRIBUTE_FALLTHROUGH; case trans_tcp: priv->client =3D virNetClientNewTCP(priv->hostname, port, AF_UNSPE= C); if (!priv->client) diff --git a/src/rpc/virnetservermdns.c b/src/rpc/virnetservermdns.c index 8d7df24..0a2bc87 100644 --- a/src/rpc/virnetservermdns.c +++ b/src/rpc/virnetservermdns.c @@ -231,7 +231,7 @@ static void virNetServerMDNSClientCallback(AvahiClient = *c, * in AVAHI_SERVER_RUNNING state we will register them * again with the new host name. */ =20 - /* Fallthrough */ + ATTRIBUTE_FALLTHROUGH; =20 case AVAHI_CLIENT_S_REGISTERING: /* The server records are now being established. This diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c index 1b0d776..9677766 100644 --- a/src/storage/storage_driver.c +++ b/src/storage/storage_driver.c @@ -3466,7 +3466,7 @@ virStorageTranslateDiskSourcePool(virConnectPtr conn, case VIR_STORAGE_SOURCE_POOL_MODE_DEFAULT: case VIR_STORAGE_SOURCE_POOL_MODE_LAST: def->src->srcpool->mode =3D VIR_STORAGE_SOURCE_POOL_MODE_HOST; - /* fallthrough */ + ATTRIBUTE_FALLTHROUGH; case VIR_STORAGE_SOURCE_POOL_MODE_HOST: def->src->srcpool->actualtype =3D VIR_STORAGE_TYPE_BLOCK; if (!(def->src->path =3D virStorageVolGetPath(vol))) diff --git a/src/util/virconf.c b/src/util/virconf.c index 4498d25..c1f41b7 100644 --- a/src/util/virconf.c +++ b/src/util/virconf.c @@ -1026,7 +1026,7 @@ int virConfGetValueStringList(virConfPtr conf, } break; } - /* fallthrough */ + ATTRIBUTE_FALLTHROUGH; =20 default: virReportError(VIR_ERR_INTERNAL_ERROR, diff --git a/src/util/virhashcode.c b/src/util/virhashcode.c index 357c05f..310ec89 100644 --- a/src/util/virhashcode.c +++ b/src/util/virhashcode.c @@ -97,17 +97,17 @@ uint32_t virHashCodeGen(const void *key, size_t len, ui= nt32_t seed) switch (len & 3) { case 3: k1 ^=3D tail[2] << 16; - /* fallthrough */ + ATTRIBUTE_FALLTHROUGH; case 2: k1 ^=3D tail[1] << 8; - /* fallthrough */ + ATTRIBUTE_FALLTHROUGH; case 1: k1 ^=3D tail[0]; k1 *=3D c1; k1 =3D rotl32(k1, 15); k1 *=3D c2; h1 ^=3D k1; - /* fallthrough */ + ATTRIBUTE_FALLTHROUGH; default: break; } diff --git a/src/util/virnetdevbridge.c b/src/util/virnetdevbridge.c index ebe9dba..11b03b4 100644 --- a/src/util/virnetdevbridge.c +++ b/src/util/virnetdevbridge.c @@ -482,6 +482,7 @@ virNetDevBridgeCreate(const char *brname) /* intentionally fall through if virNetDevBridgeCreateWithIoct= l() * isn't available. */ + ATTRIBUTE_FALLTHROUGH; default: virReportSystemError(-err->error, _("error creating bridge interface %s"), diff --git a/src/util/virutil.c b/src/util/virutil.c index 79db1d8..aba7c6d 100644 --- a/src/util/virutil.c +++ b/src/util/virutil.c @@ -312,19 +312,19 @@ virScaleInteger(unsigned long long *value, const char= *suffix, switch (c_tolower(*suffix)) { case 'e': scale *=3D base; - /* fallthrough */ + ATTRIBUTE_FALLTHROUGH; case 'p': scale *=3D base; - /* fallthrough */ + ATTRIBUTE_FALLTHROUGH; case 't': scale *=3D base; - /* fallthrough */ + ATTRIBUTE_FALLTHROUGH; case 'g': scale *=3D base; - /* fallthrough */ + ATTRIBUTE_FALLTHROUGH; case 'm': scale *=3D base; - /* fallthrough */ + ATTRIBUTE_FALLTHROUGH; case 'k': scale *=3D base; break; diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index ccb514e..4a774c5 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -2496,14 +2496,14 @@ virshBlockJobInfo(vshControl *ctl, switch (last_error->code) { case VIR_ERR_INVALID_ARG: priv->blockJobNoBytes =3D true; - /* fallthrough */ + ATTRIBUTE_FALLTHROUGH; case VIR_ERR_OVERFLOW: if (!bytes && !raw) { /* try again with MiB/s, unless forcing bytes */ vshResetLibvirtError(); break; } - /* fallthrough */ + ATTRIBUTE_FALLTHROUGH; default: goto cleanup; } diff --git a/tools/virsh.c b/tools/virsh.c index 1f5c2b1..3da9534 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -777,7 +777,7 @@ virshParseArgv(vshControl *ctl, int argc, char **argv) puts(VERSION); exit(EXIT_SUCCESS); } - /* fall through */ + ATTRIBUTE_FALLTHROUGH; case 'V': virshShowVersion(ctl); exit(EXIT_SUCCESS); diff --git a/tools/virt-admin.c b/tools/virt-admin.c index 0fa1c00..6157ed2 100644 --- a/tools/virt-admin.c +++ b/tools/virt-admin.c @@ -1300,7 +1300,7 @@ vshAdmParseArgv(vshControl *ctl, int argc, char **arg= v) puts(VERSION); exit(EXIT_SUCCESS); } - /* fall through */ + ATTRIBUTE_FALLTHROUGH; case 'V': vshAdmShowVersion(ctl); exit(EXIT_SUCCESS); --=20 2.5.5 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list