From nobody Wed May 1 22:31:28 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 1490192612140374.71597320140825; Wed, 22 Mar 2017 07:23:32 -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 7C3E065D14; Wed, 22 Mar 2017 14:23:31 +0000 (UTC) Received: from colo-mx.corp.redhat.com (unknown [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 51AE6852A0; Wed, 22 Mar 2017 14:23:31 +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 97E5865D2C; Wed, 22 Mar 2017 14:23:29 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v2MELfKS026291 for ; Wed, 22 Mar 2017 10:21:41 -0400 Received: by smtp.corp.redhat.com (Postfix) id E32797B8FB; Wed, 22 Mar 2017 14:21:41 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-76.phx2.redhat.com [10.3.116.76]) by smtp.corp.redhat.com (Postfix) with ESMTP id A14FF7B8F3 for ; Wed, 22 Mar 2017 14:21:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 7C3E065D14 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.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 7C3E065D14 From: John Ferlan To: libvir-list@redhat.com Date: Wed, 22 Mar 2017 10:21:14 -0400 Message-Id: <20170322142135.3421-2-jferlan@redhat.com> In-Reply-To: <20170322142135.3421-1-jferlan@redhat.com> References: <20170322142135.3421-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 01/22] qemu: Always format formatStr for blockdev-snapshot-sync 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, 22 Mar 2017 14:23:32 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The qemuDomainSnapshotPrepare should always set a > 0 format value anyway, so remove the check. Found by Coverity. Signed-off-by: John Ferlan --- src/qemu/qemu_driver.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 0e06508..6762952 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -14072,8 +14072,7 @@ qemuDomainSnapshotCreateSingleDiskActive(virQEMUDri= verPtr driver, dd->prepared =3D true; =20 /* create the actual snapshot */ - if (dd->src->format) - formatStr =3D virStorageFileFormatTypeToString(dd->src->format); + formatStr =3D virStorageFileFormatTypeToString(dd->src->format); =20 /* The monitor is only accessed if qemu doesn't support transactions. * Otherwise the following monitor command only constructs the command. --=20 2.9.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed May 1 22:31:28 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 1490192692691756.604794229661; Wed, 22 Mar 2017 07:24:52 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1FA6B81247; Wed, 22 Mar 2017 14:24:52 +0000 (UTC) Received: from colo-mx.corp.redhat.com (unknown [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DFE327E635; Wed, 22 Mar 2017 14:24:51 +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 939D265D2D; Wed, 22 Mar 2017 14:24:51 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v2MELgpX026297 for ; Wed, 22 Mar 2017 10:21:42 -0400 Received: by smtp.corp.redhat.com (Postfix) id 613A97B8FB; Wed, 22 Mar 2017 14:21:42 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-76.phx2.redhat.com [10.3.116.76]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1CA197B8F3 for ; Wed, 22 Mar 2017 14:21:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 1FA6B81247 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.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 1FA6B81247 From: John Ferlan To: libvir-list@redhat.com Date: Wed, 22 Mar 2017 10:21:15 -0400 Message-Id: <20170322142135.3421-3-jferlan@redhat.com> In-Reply-To: <20170322142135.3421-1-jferlan@redhat.com> References: <20170322142135.3421-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 02/22] util: Remove NONNULL(1) for virNetDevGetName 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 22 Mar 2017 14:24:52 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The 'ifindex' argument is not a pointer, so no need for NONNULL in prototype Signed-off-by: John Ferlan --- src/util/virnetdev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virnetdev.h b/src/util/virnetdev.h index 01e9c5b..9c9daf1 100644 --- a/src/util/virnetdev.h +++ b/src/util/virnetdev.h @@ -158,7 +158,7 @@ int virNetDevSetName(const char *ifname, const char *ne= wifname) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK; =20 char *virNetDevGetName(int ifindex) - ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK; + ATTRIBUTE_RETURN_CHECK; int virNetDevGetIndex(const char *ifname, int *ifindex) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK; =20 --=20 2.9.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed May 1 22:31:28 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 1490192683629873.5238896258344; Wed, 22 Mar 2017 07:24:43 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5062B83F3A; Wed, 22 Mar 2017 14:24:43 +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 27A5717AA8; Wed, 22 Mar 2017 14:24:43 +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 CFBAD18523C9; Wed, 22 Mar 2017 14:24:42 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v2MELgvm026309 for ; Wed, 22 Mar 2017 10:21:42 -0400 Received: by smtp.corp.redhat.com (Postfix) id DD7EE7B8F3; Wed, 22 Mar 2017 14:21:42 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-76.phx2.redhat.com [10.3.116.76]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9DDA87B8FD for ; Wed, 22 Mar 2017 14:21:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 5062B83F3A Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.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 5062B83F3A From: John Ferlan To: libvir-list@redhat.com Date: Wed, 22 Mar 2017 10:21:16 -0400 Message-Id: <20170322142135.3421-4-jferlan@redhat.com> In-Reply-To: <20170322142135.3421-1-jferlan@redhat.com> References: <20170322142135.3421-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 03/22] conf: Remove NONNULL(2) for virNetDevBandwidthParse 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 22 Mar 2017 14:24:43 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Since the code checks and handles a NULL 'node' before proceeding there's no need for the prototype with the NONNULL(2). Signed-off-by: John Ferlan --- src/conf/netdev_bandwidth_conf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conf/netdev_bandwidth_conf.h b/src/conf/netdev_bandwidth_c= onf.h index cdeac09..c687427 100644 --- a/src/conf/netdev_bandwidth_conf.h +++ b/src/conf/netdev_bandwidth_conf.h @@ -32,7 +32,7 @@ int virNetDevBandwidthParse(virNetDevBandwidthPtr *bandwidth, xmlNodePtr node, int net_type) - ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK; + ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK; int virNetDevBandwidthFormat(virNetDevBandwidthPtr def, virBufferPtr buf) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); --=20 2.9.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed May 1 22:31:28 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 1490192696130566.628841150005; Wed, 22 Mar 2017 07:24:56 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9730BC054906; Wed, 22 Mar 2017 14:24:55 +0000 (UTC) Received: from colo-mx.corp.redhat.com (unknown [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6B8EC7DFE5; Wed, 22 Mar 2017 14:24:55 +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 273E265D32; Wed, 22 Mar 2017 14:24:55 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v2MELhKH026316 for ; Wed, 22 Mar 2017 10:21:43 -0400 Received: by smtp.corp.redhat.com (Postfix) id 5B1D07B8FB; Wed, 22 Mar 2017 14:21:43 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-76.phx2.redhat.com [10.3.116.76]) by smtp.corp.redhat.com (Postfix) with ESMTP id 16B6B7B8F3 for ; Wed, 22 Mar 2017 14:21:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 9730BC054906 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.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 9730BC054906 From: John Ferlan To: libvir-list@redhat.com Date: Wed, 22 Mar 2017 10:21:17 -0400 Message-Id: <20170322142135.3421-5-jferlan@redhat.com> In-Reply-To: <20170322142135.3421-1-jferlan@redhat.com> References: <20170322142135.3421-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 04/22] conf: Remove NONNULL(1, 2) for virNetDevBandwidthFormat 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.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Wed, 22 Mar 2017 14:24:56 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Since the code checks and handles NULL parameters, remove the NONNULL from the prototype. Also fix the comment in the source to reference the right name. Signed-off-by: John Ferlan --- src/conf/netdev_bandwidth_conf.c | 2 +- src/conf/netdev_bandwidth_conf.h | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/conf/netdev_bandwidth_conf.c b/src/conf/netdev_bandwidth_c= onf.c index 8824332..50138fd 100644 --- a/src/conf/netdev_bandwidth_conf.c +++ b/src/conf/netdev_bandwidth_conf.c @@ -241,7 +241,7 @@ virNetDevBandwidthRateFormat(virNetDevBandwidthRatePtr = def, } =20 /** - * virNetDevBandwidthDefFormat: + * virNetDevBandwidthFormat: * @def: Data source * @buf: Buffer to print to * diff --git a/src/conf/netdev_bandwidth_conf.h b/src/conf/netdev_bandwidth_c= onf.h index c687427..30f9889 100644 --- a/src/conf/netdev_bandwidth_conf.h +++ b/src/conf/netdev_bandwidth_conf.h @@ -34,8 +34,7 @@ int virNetDevBandwidthParse(virNetDevBandwidthPtr *bandwi= dth, int net_type) ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK; int virNetDevBandwidthFormat(virNetDevBandwidthPtr def, - virBufferPtr buf) - ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); + virBufferPtr buf); =20 void virDomainClearNetBandwidth(virDomainObjPtr vm) ATTRIBUTE_NONNULL(1); --=20 2.9.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed May 1 22:31:28 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 1490192688868754.8885199980514; Wed, 22 Mar 2017 07:24:48 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 207BAC04BD47; Wed, 22 Mar 2017 14:24:48 +0000 (UTC) Received: from colo-mx.corp.redhat.com (unknown [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EA6137E63F; Wed, 22 Mar 2017 14:24:47 +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 A0AF765D2B; Wed, 22 Mar 2017 14:24:47 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v2MELhgi026321 for ; Wed, 22 Mar 2017 10:21:43 -0400 Received: by smtp.corp.redhat.com (Postfix) id CAC647B8FD; Wed, 22 Mar 2017 14:21:43 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-76.phx2.redhat.com [10.3.116.76]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8469E7B8F3 for ; Wed, 22 Mar 2017 14:21:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 207BAC04BD47 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.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 207BAC04BD47 From: John Ferlan To: libvir-list@redhat.com Date: Wed, 22 Mar 2017 10:21:18 -0400 Message-Id: <20170322142135.3421-6-jferlan@redhat.com> In-Reply-To: <20170322142135.3421-1-jferlan@redhat.com> References: <20170322142135.3421-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 05/22] conf: Remove NONNULL(1) for virDomainNumaGetNodeCount 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 22 Mar 2017 14:24:48 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Since the code checks and handles a NULL 'numa' parameter, remove the NONNU= LL from the prototype. Signed-off-by: John Ferlan --- src/conf/numa_conf.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/conf/numa_conf.h b/src/conf/numa_conf.h index 05529ba..b6a5354 100644 --- a/src/conf/numa_conf.h +++ b/src/conf/numa_conf.h @@ -85,8 +85,8 @@ int virDomainNumatuneMaybeGetNodeset(virDomainNumaPtr num= atune, virBitmapPtr *retNodeset, int cellid); =20 -size_t virDomainNumaGetNodeCount(virDomainNumaPtr numa) - ATTRIBUTE_NONNULL(1); +size_t virDomainNumaGetNodeCount(virDomainNumaPtr numa); + virBitmapPtr virDomainNumaGetNodeCpumask(virDomainNumaPtr numa, size_t node) ATTRIBUTE_NONNULL(1); --=20 2.9.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed May 1 22:31:28 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 1490192692185441.200816753184; Wed, 22 Mar 2017 07:24:52 -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 9A629C04BD4C; Wed, 22 Mar 2017 14:24:51 +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 6DF0118A53; Wed, 22 Mar 2017 14:24:51 +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 0F44518523CF; Wed, 22 Mar 2017 14:24:51 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v2MELikx026329 for ; Wed, 22 Mar 2017 10:21:44 -0400 Received: by smtp.corp.redhat.com (Postfix) id 69F8E7B8F3; Wed, 22 Mar 2017 14:21:44 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-76.phx2.redhat.com [10.3.116.76]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1FEDE7B8FD for ; Wed, 22 Mar 2017 14:21:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 9A629C04BD4C Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.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 9A629C04BD4C From: John Ferlan To: libvir-list@redhat.com Date: Wed, 22 Mar 2017 10:21:19 -0400 Message-Id: <20170322142135.3421-7-jferlan@redhat.com> In-Reply-To: <20170322142135.3421-1-jferlan@redhat.com> References: <20170322142135.3421-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 06/22] network: Remove null newBandwidth check from networkBandwidthUpdate 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.31]); Wed, 22 Mar 2017 14:24:52 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The prototype requires a NONNULL argument and the only caller passes in a non-null parameter. Besides the "else if" condition would deref it anyway. Signed-off-by: John Ferlan --- src/network/bridge_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index a753cd7..d975092 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -5468,7 +5468,7 @@ networkBandwidthUpdate(virDomainNetDefPtr iface, /* Okay, there are three possible scenarios: */ =20 if (ifaceBand && ifaceBand->in && ifaceBand->in->floor && - newBandwidth && newBandwidth->in && newBandwidth->in->floor) { + newBandwidth->in && newBandwidth->in->floor) { /* Either we just need to update @floor .. */ =20 if (virNetDevBandwidthUpdateRate(network->def->bridge, --=20 2.9.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed May 1 22:31:28 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 1490192699773944.1128471268869; Wed, 22 Mar 2017 07:24:59 -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 3480A8FCF4; Wed, 22 Mar 2017 14:24:59 +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 E8869852B1; Wed, 22 Mar 2017 14:24:58 +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 999F718523D3; Wed, 22 Mar 2017 14:24:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v2MELjIf026334 for ; Wed, 22 Mar 2017 10:21:45 -0400 Received: by smtp.corp.redhat.com (Postfix) id F16C97B8FB; Wed, 22 Mar 2017 14:21:44 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-76.phx2.redhat.com [10.3.116.76]) by smtp.corp.redhat.com (Postfix) with ESMTP id B00CD7B8F3 for ; Wed, 22 Mar 2017 14:21:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 3480A8FCF4 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.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 3480A8FCF4 From: John Ferlan To: libvir-list@redhat.com Date: Wed, 22 Mar 2017 10:21:20 -0400 Message-Id: <20170322142135.3421-8-jferlan@redhat.com> In-Reply-To: <20170322142135.3421-1-jferlan@redhat.com> References: <20170322142135.3421-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 07/22] qemu: Remove non null 'vm' check from qemuMonitorOpen 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.26]); Wed, 22 Mar 2017 14:24:59 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The prototype requires not passing a NULL in the parameter and the callers all would fail far before this code would fail if 'vm' was NULL, so just remove the check. Signed-off-by: John Ferlan --- src/qemu/qemu_monitor.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 79da472..8218029 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -910,8 +910,7 @@ qemuMonitorOpen(virDomainObjPtr vm, case VIR_DOMAIN_CHR_TYPE_UNIX: hasSendFD =3D true; if ((fd =3D qemuMonitorOpenUnix(config->data.nix.path, - vm ? vm->pid : 0, - timeout)) < 0) + vm->pid, timeout)) < 0) return NULL; break; =20 --=20 2.9.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed May 1 22:31:28 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 1490192706350783.1275316087484; Wed, 22 Mar 2017 07:25:06 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8CB203D96B; Wed, 22 Mar 2017 14:25:04 +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 619087DFEC; Wed, 22 Mar 2017 14:25:04 +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 43C8018523D4; Wed, 22 Mar 2017 14:25:02 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v2MELjWu026345 for ; Wed, 22 Mar 2017 10:21:45 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6DA207B8F3; Wed, 22 Mar 2017 14:21:45 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-76.phx2.redhat.com [10.3.116.76]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2C29E7B8FB for ; Wed, 22 Mar 2017 14:21:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 8CB203D96B Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx06.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 8CB203D96B From: John Ferlan To: libvir-list@redhat.com Date: Wed, 22 Mar 2017 10:21:21 -0400 Message-Id: <20170322142135.3421-9-jferlan@redhat.com> In-Reply-To: <20170322142135.3421-1-jferlan@redhat.com> References: <20170322142135.3421-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 08/22] qemu: Remove NONNULL(1) for qemu_monitor prototypes 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.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 22 Mar 2017 14:25:06 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The 'mon' argument validity is checked in the QEMU_CHECK_MONITOR for the following functions, so they don't need the NONNULL on their prototype: qemuMonitorUpdateVideoMemorySize qemuMonitorUpdateVideoVram64Size qemuMonitorGetAllBlockStatsInfo qemuMonitorBlockStatsUpdateCapacity Signed-off-by: John Ferlan --- src/qemu/qemu_monitor.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index cf79424..888a03d 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -281,11 +281,11 @@ void qemuMonitorSetOptions(qemuMonitorPtr mon, virJSO= NValuePtr options) int qemuMonitorUpdateVideoMemorySize(qemuMonitorPtr mon, virDomainVideoDefPtr video, const char *videoName) - ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3); + ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3); int qemuMonitorUpdateVideoVram64Size(qemuMonitorPtr mon, virDomainVideoDefPtr video, const char *videoName) - ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3); + ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3); int qemuMonitorHMPCommandWithFd(qemuMonitorPtr mon, const char *cmd, int scm_fd, @@ -497,12 +497,12 @@ struct _qemuBlockStats { int qemuMonitorGetAllBlockStatsInfo(qemuMonitorPtr mon, virHashTablePtr *ret_stats, bool backingChain) - ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); + ATTRIBUTE_NONNULL(2); =20 int qemuMonitorBlockStatsUpdateCapacity(qemuMonitorPtr mon, virHashTablePtr stats, bool backingChain) - ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); + ATTRIBUTE_NONNULL(2); =20 int qemuMonitorBlockResize(qemuMonitorPtr mon, const char *dev_name, --=20 2.9.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed May 1 22:31:28 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 1490192707270766.8593347720317; Wed, 22 Mar 2017 07:25:07 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A2AE98E23C; Wed, 22 Mar 2017 14:25:06 +0000 (UTC) Received: from colo-mx.corp.redhat.com (unknown [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 617176292F; Wed, 22 Mar 2017 14:25:06 +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 0445865D34; Wed, 22 Mar 2017 14:25:06 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v2MELjkZ026350 for ; Wed, 22 Mar 2017 10:21:45 -0400 Received: by smtp.corp.redhat.com (Postfix) id EE9987B8FB; Wed, 22 Mar 2017 14:21:45 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-76.phx2.redhat.com [10.3.116.76]) by smtp.corp.redhat.com (Postfix) with ESMTP id ADAE07B8F3 for ; Wed, 22 Mar 2017 14:21:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com A2AE98E23C Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.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 A2AE98E23C From: John Ferlan To: libvir-list@redhat.com Date: Wed, 22 Mar 2017 10:21:22 -0400 Message-Id: <20170322142135.3421-10-jferlan@redhat.com> In-Reply-To: <20170322142135.3421-1-jferlan@redhat.com> References: <20170322142135.3421-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 09/22] util: Change return argument for virBitmapParseUnlimited 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.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 22 Mar 2017 14:25:07 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Rather than returning an int and a *bitmap pointer, just return and check a NULL bitmap pointer Signed-off-by: John Ferlan --- src/util/virbitmap.c | 26 ++++++++++++-------------- src/util/virbitmap.h | 7 +++---- tests/testutils.c | 2 +- tests/virbitmaptest.c | 2 +- 4 files changed, 17 insertions(+), 20 deletions(-) diff --git a/src/util/virbitmap.c b/src/util/virbitmap.c index 1b47d74..d263d73 100644 --- a/src/util/virbitmap.c +++ b/src/util/virbitmap.c @@ -545,7 +545,6 @@ virBitmapParse(const char *str, /** * virBitmapParseUnlimited: * @str: points to a string representing a human-readable bitmap - * @bitmap: a bitmap created from @str * * This function is the counterpart of virBitmapFormat. This function crea= tes * a bitmap, in which bits are set according to the content of @str. @@ -556,20 +555,20 @@ virBitmapParse(const char *str, * to set, and ^N, which means to unset the bit, and N-M for ranges of bits * to set. * - * Returns 0 on success, or -1 in case of error. + * Returns @bitmap on success, or NULL in case of error */ -int -virBitmapParseUnlimited(const char *str, - virBitmapPtr *bitmap) +virBitmapPtr +virBitmapParseUnlimited(const char *str) { + virBitmapPtr bitmap; bool neg =3D false; const char *cur =3D str; char *tmp; size_t i; int start, last; =20 - if (!(*bitmap =3D virBitmapNewEmpty())) - return -1; + if (!(bitmap =3D virBitmapNewEmpty())) + return NULL; =20 if (!str) goto error; @@ -605,10 +604,10 @@ virBitmapParseUnlimited(const char *str, =20 if (*cur =3D=3D ',' || *cur =3D=3D 0) { if (neg) { - if (virBitmapClearBitExpand(*bitmap, start) < 0) + if (virBitmapClearBitExpand(bitmap, start) < 0) goto error; } else { - if (virBitmapSetBitExpand(*bitmap, start) < 0) + if (virBitmapSetBitExpand(bitmap, start) < 0) goto error; } } else if (*cur =3D=3D '-') { @@ -626,7 +625,7 @@ virBitmapParseUnlimited(const char *str, cur =3D tmp; =20 for (i =3D start; i <=3D last; i++) { - if (virBitmapSetBitExpand(*bitmap, i) < 0) + if (virBitmapSetBitExpand(bitmap, i) < 0) goto error; } =20 @@ -644,14 +643,13 @@ virBitmapParseUnlimited(const char *str, } } =20 - return 0; + return bitmap; =20 error: virReportError(VIR_ERR_INVALID_ARG, _("Failed to parse bitmap '%s'"), str); - virBitmapFree(*bitmap); - *bitmap =3D NULL; - return -1; + virBitmapFree(bitmap); + return NULL; } =20 /** diff --git a/src/util/virbitmap.h b/src/util/virbitmap.h index 58e0ee6..3ba40ae 100644 --- a/src/util/virbitmap.h +++ b/src/util/virbitmap.h @@ -94,10 +94,9 @@ virBitmapParseSeparator(const char *str, char terminator, virBitmapPtr *bitmap, size_t bitmapSize); -int -virBitmapParseUnlimited(const char *str, - virBitmapPtr *bitmap) - ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); +virBitmapPtr +virBitmapParseUnlimited(const char *str) + ATTRIBUTE_NONNULL(1); =20 virBitmapPtr virBitmapNewCopy(virBitmapPtr src) ATTRIBUTE_NONNULL(1); =20 diff --git a/tests/testutils.c b/tests/testutils.c index a596a83..13eff9e 100644 --- a/tests/testutils.c +++ b/tests/testutils.c @@ -926,7 +926,7 @@ int virTestMain(int argc, } =20 if ((testRange =3D getenv("VIR_TEST_RANGE")) !=3D NULL) { - if (virBitmapParseUnlimited(testRange, &testBitmap) < 0) { + if (!(testBitmap =3D virBitmapParseUnlimited(testRange))) { fprintf(stderr, "Cannot parse range %s\n", testRange); return EXIT_FAILURE; } diff --git a/tests/virbitmaptest.c b/tests/virbitmaptest.c index 3ee07ff..e007efc 100644 --- a/tests/virbitmaptest.c +++ b/tests/virbitmaptest.c @@ -650,7 +650,7 @@ test12(const void *opaque ATTRIBUTE_UNUSED) TEST_MAP(151, "128"); =20 virBitmapFree(map); - if (virBitmapParseUnlimited("34,1023", &map) < 0) + if (!(map =3D virBitmapParseUnlimited("34,1023"))) goto cleanup; =20 TEST_MAP(1024, "34,1023"); --=20 2.9.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed May 1 22:31:28 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 1490192619314312.83243419457995; Wed, 22 Mar 2017 07:23: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 E470F7DD06; Wed, 22 Mar 2017 14:23:38 +0000 (UTC) Received: from colo-mx.corp.redhat.com (unknown [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BE9DBA566E; Wed, 22 Mar 2017 14:23:38 +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 7D03565D2C; Wed, 22 Mar 2017 14:23:38 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v2MELkIH026360 for ; Wed, 22 Mar 2017 10:21:46 -0400 Received: by smtp.corp.redhat.com (Postfix) id 65ACF179D1; Wed, 22 Mar 2017 14:21:46 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-76.phx2.redhat.com [10.3.116.76]) by smtp.corp.redhat.com (Postfix) with ESMTP id 22E397B8F3 for ; Wed, 22 Mar 2017 14:21:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com E470F7DD06 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.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 E470F7DD06 From: John Ferlan To: libvir-list@redhat.com Date: Wed, 22 Mar 2017 10:21:23 -0400 Message-Id: <20170322142135.3421-11-jferlan@redhat.com> In-Reply-To: <20170322142135.3421-1-jferlan@redhat.com> References: <20170322142135.3421-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 10/22] util: Remove NONNULL(1) for virBitmapParseUnlimited 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.26]); Wed, 22 Mar 2017 14:23:39 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The code checks and handles a NULL 'str', so just remove the NONNULL. Update the error message to add the NULLSTR() around 'str' also. Signed-off-by: John Ferlan --- src/util/virbitmap.c | 2 +- src/util/virbitmap.h | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/util/virbitmap.c b/src/util/virbitmap.c index d263d73..eac63d9 100644 --- a/src/util/virbitmap.c +++ b/src/util/virbitmap.c @@ -647,7 +647,7 @@ virBitmapParseUnlimited(const char *str) =20 error: virReportError(VIR_ERR_INVALID_ARG, - _("Failed to parse bitmap '%s'"), str); + _("Failed to parse bitmap '%s'"), NULLSTR(str)); virBitmapFree(bitmap); return NULL; } diff --git a/src/util/virbitmap.h b/src/util/virbitmap.h index 3ba40ae..36282af 100644 --- a/src/util/virbitmap.h +++ b/src/util/virbitmap.h @@ -95,8 +95,7 @@ virBitmapParseSeparator(const char *str, virBitmapPtr *bitmap, size_t bitmapSize); virBitmapPtr -virBitmapParseUnlimited(const char *str) - ATTRIBUTE_NONNULL(1); +virBitmapParseUnlimited(const char *str); =20 virBitmapPtr virBitmapNewCopy(virBitmapPtr src) ATTRIBUTE_NONNULL(1); =20 --=20 2.9.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed May 1 22:31:28 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 1490192623269336.6841491619408; Wed, 22 Mar 2017 07:23:43 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8ACB7C04BD47; Wed, 22 Mar 2017 14:23:42 +0000 (UTC) Received: from colo-mx.corp.redhat.com (unknown [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 55DEF5C88E; Wed, 22 Mar 2017 14:23: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 0428665D33; Wed, 22 Mar 2017 14:23:42 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v2MELkpl026370 for ; Wed, 22 Mar 2017 10:21:46 -0400 Received: by smtp.corp.redhat.com (Postfix) id D384F7B8F3; Wed, 22 Mar 2017 14:21:46 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-76.phx2.redhat.com [10.3.116.76]) by smtp.corp.redhat.com (Postfix) with ESMTP id 917CE179D1 for ; Wed, 22 Mar 2017 14:21:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 8ACB7C04BD47 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.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 8ACB7C04BD47 From: John Ferlan To: libvir-list@redhat.com Date: Wed, 22 Mar 2017 10:21:24 -0400 Message-Id: <20170322142135.3421-12-jferlan@redhat.com> In-Reply-To: <20170322142135.3421-1-jferlan@redhat.com> References: <20170322142135.3421-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 11/22] util: Remove NONNULL(2, 3) for virHostdevReAttachPCIDevices 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.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 22 Mar 2017 14:23:43 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The called function uses a STRNEQ_NULLABLE anyway for both 'drv_name' and 'dom_name', so no need. Signed-off-by: John Ferlan --- src/util/virhostdev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virhostdev.h b/src/util/virhostdev.h index 1202136..4ce5c4d 100644 --- a/src/util/virhostdev.h +++ b/src/util/virhostdev.h @@ -103,7 +103,7 @@ virHostdevReAttachPCIDevices(virHostdevManagerPtr hostd= ev_mgr, virDomainHostdevDefPtr *hostdevs, int nhostdevs, const char *oldStateDir) - ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3); + ATTRIBUTE_NONNULL(1); void virHostdevReAttachUSBDevices(virHostdevManagerPtr hostdev_mgr, const char *drv_name, --=20 2.9.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed May 1 22:31:28 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 1490192712383265.1270440747488; Wed, 22 Mar 2017 07:25:12 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CFAB380498; Wed, 22 Mar 2017 14:25:10 +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 8CC7F60BF1; Wed, 22 Mar 2017 14:25:10 +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 B336318523D6; Wed, 22 Mar 2017 14:25:09 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v2MELlTQ026375 for ; Wed, 22 Mar 2017 10:21:47 -0400 Received: by smtp.corp.redhat.com (Postfix) id 477C97B8F3; Wed, 22 Mar 2017 14:21:47 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-76.phx2.redhat.com [10.3.116.76]) by smtp.corp.redhat.com (Postfix) with ESMTP id 08060179D1 for ; Wed, 22 Mar 2017 14:21:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com CFAB380498 Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.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 CFAB380498 From: John Ferlan To: libvir-list@redhat.com Date: Wed, 22 Mar 2017 10:21:25 -0400 Message-Id: <20170322142135.3421-13-jferlan@redhat.com> In-Reply-To: <20170322142135.3421-1-jferlan@redhat.com> References: <20170322142135.3421-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 12/22] util: Remove NONNULL(2, 3) for virHostdevReAttachUSBDevices 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Wed, 22 Mar 2017 14:25:12 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The comparison code used STREQ_NULLABLE anyway for both 'drv_name' and 'dom_name', so no need. Add a NULLSTR on the 'dom_name' too. Signed-off-by: John Ferlan --- src/util/virhostdev.c | 2 +- src/util/virhostdev.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/virhostdev.c b/src/util/virhostdev.c index 86ca8e0..c424a97 100644 --- a/src/util/virhostdev.c +++ b/src/util/virhostdev.c @@ -1624,7 +1624,7 @@ virHostdevReAttachUSBDevices(virHostdevManagerPtr mgr, =20 if (!(usb =3D virUSBDeviceNew(usbsrc->bus, usbsrc->device, NULL)))= { VIR_WARN("Unable to reattach USB device %03d.%03d on domain %s= ", - usbsrc->bus, usbsrc->device, dom_name); + usbsrc->bus, usbsrc->device, NULLSTR(dom_name)); continue; } =20 diff --git a/src/util/virhostdev.h b/src/util/virhostdev.h index 4ce5c4d..76039bb 100644 --- a/src/util/virhostdev.h +++ b/src/util/virhostdev.h @@ -110,7 +110,7 @@ virHostdevReAttachUSBDevices(virHostdevManagerPtr hostd= ev_mgr, const char *dom_name, virDomainHostdevDefPtr *hostdevs, int nhostdevs) - ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3); + ATTRIBUTE_NONNULL(1); void virHostdevReAttachSCSIDevices(virHostdevManagerPtr hostdev_mgr, const char *drv_name, --=20 2.9.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed May 1 22:31:28 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 1490192715169573.8830637643; Wed, 22 Mar 2017 07:25:15 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 638EF4DD62; Wed, 22 Mar 2017 14:25:14 +0000 (UTC) Received: from colo-mx.corp.redhat.com (unknown [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 35C1917254; Wed, 22 Mar 2017 14:25:14 +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 D7A0365D2C; Wed, 22 Mar 2017 14:25:13 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v2MELmxd026387 for ; Wed, 22 Mar 2017 10:21:48 -0400 Received: by smtp.corp.redhat.com (Postfix) id 11B4D7B8FD; Wed, 22 Mar 2017 14:21:48 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-76.phx2.redhat.com [10.3.116.76]) by smtp.corp.redhat.com (Postfix) with ESMTP id C585E7B8F3 for ; Wed, 22 Mar 2017 14:21:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 638EF4DD62 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.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 638EF4DD62 From: John Ferlan To: libvir-list@redhat.com Date: Wed, 22 Mar 2017 10:21:26 -0400 Message-Id: <20170322142135.3421-14-jferlan@redhat.com> In-Reply-To: <20170322142135.3421-1-jferlan@redhat.com> References: <20170322142135.3421-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 13/22] util: Remove NONNULL(2, 3) for virHostdevReAttachSCSIVHostDevices 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.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 22 Mar 2017 14:25:15 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The comparison code used STREQ_NULLABLE anyway for both 'drv_name' and 'dom_name', so no need. Add a NULLSTR on the 'dom_name' too. Signed-off-by: John Ferlan --- src/util/virhostdev.c | 2 +- src/util/virhostdev.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/virhostdev.c b/src/util/virhostdev.c index c424a97..fc0ebcb 100644 --- a/src/util/virhostdev.c +++ b/src/util/virhostdev.c @@ -1756,7 +1756,7 @@ virHostdevReAttachSCSIVHostDevices(virHostdevManagerP= tr mgr, =20 if (!(host =3D virSCSIVHostDeviceNew(hostsrc->wwpn))) { VIR_WARN("Unable to reattach SCSI_host device %s on domain %s", - hostsrc->wwpn, dom_name); + hostsrc->wwpn, NULLSTR(dom_name)); virObjectUnlock(mgr->activeSCSIVHostHostdevs); return; } diff --git a/src/util/virhostdev.h b/src/util/virhostdev.h index 76039bb..43ba705 100644 --- a/src/util/virhostdev.h +++ b/src/util/virhostdev.h @@ -124,7 +124,7 @@ virHostdevReAttachSCSIVHostDevices(virHostdevManagerPtr= hostdev_mgr, const char *dom_name, virDomainHostdevDefPtr *hostdevs, int nhostdevs) - ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3); + ATTRIBUTE_NONNULL(1); int virHostdevUpdateActivePCIDevices(virHostdevManagerPtr mgr, virDomainHostdevDefPtr *hostdevs, --=20 2.9.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed May 1 22:31:28 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 1490192721730909.9954854261603; Wed, 22 Mar 2017 07:25:21 -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 2DADD3F75C; Wed, 22 Mar 2017 14:25:18 +0000 (UTC) Received: from colo-mx.corp.redhat.com (unknown [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EE433189B4; Wed, 22 Mar 2017 14:25:17 +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 A4F1865D35; Wed, 22 Mar 2017 14:25:17 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v2MELmPv026394 for ; Wed, 22 Mar 2017 10:21:48 -0400 Received: by smtp.corp.redhat.com (Postfix) id 7A7A47B8F3; Wed, 22 Mar 2017 14:21:48 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-76.phx2.redhat.com [10.3.116.76]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3A95E7BAEB for ; Wed, 22 Mar 2017 14:21:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 2DADD3F75C Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx06.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 2DADD3F75C From: John Ferlan To: libvir-list@redhat.com Date: Wed, 22 Mar 2017 10:21:27 -0400 Message-Id: <20170322142135.3421-15-jferlan@redhat.com> In-Reply-To: <20170322142135.3421-1-jferlan@redhat.com> References: <20170322142135.3421-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 14/22] util: Remove NONNULL(1) for virHostdevPrepareDomainDevices 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.30]); Wed, 22 Mar 2017 14:25:21 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Since the code checks 'mgr =3D=3D NULL' anyway, no need for the prototype to have the NONNULL arg check. Also add an error message to indicate what the failure is so that there isn't a failed for some reason error. Signed-off-by: John Ferlan --- src/util/virhostdev.c | 5 ++++- src/util/virhostdev.h | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/util/virhostdev.c b/src/util/virhostdev.c index fc0ebcb..a75d108 100644 --- a/src/util/virhostdev.c +++ b/src/util/virhostdev.c @@ -1873,8 +1873,11 @@ virHostdevPrepareDomainDevices(virHostdevManagerPtr = mgr, if (!def->nhostdevs) return 0; =20 - if (mgr =3D=3D NULL) + if (!mgr) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("no host device manager defined")); return -1; + } =20 if (flags & VIR_HOSTDEV_SP_PCI) { if (virHostdevPreparePCIDevices(mgr, driver, diff --git a/src/util/virhostdev.h b/src/util/virhostdev.h index 43ba705..7ee0b43 100644 --- a/src/util/virhostdev.h +++ b/src/util/virhostdev.h @@ -157,7 +157,7 @@ virHostdevPrepareDomainDevices(virHostdevManagerPtr mgr, const char *driver, virDomainDefPtr def, unsigned int flags) - ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3); + ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3); void virHostdevReAttachDomainDevices(virHostdevManagerPtr mgr, const char *driver, --=20 2.9.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed May 1 22:31:28 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 1490192721929461.87489569714717; Wed, 22 Mar 2017 07:25:21 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 86445804FB; Wed, 22 Mar 2017 14:25:21 +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 5D5327F383; Wed, 22 Mar 2017 14:25:21 +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 1535E18523CC; Wed, 22 Mar 2017 14:25:21 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v2MELms0026399 for ; Wed, 22 Mar 2017 10:21:48 -0400 Received: by smtp.corp.redhat.com (Postfix) id ED699179C4; Wed, 22 Mar 2017 14:21:48 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-76.phx2.redhat.com [10.3.116.76]) by smtp.corp.redhat.com (Postfix) with ESMTP id A2F577D50C for ; Wed, 22 Mar 2017 14:21:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 86445804FB Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.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 86445804FB From: John Ferlan To: libvir-list@redhat.com Date: Wed, 22 Mar 2017 10:21:28 -0400 Message-Id: <20170322142135.3421-16-jferlan@redhat.com> In-Reply-To: <20170322142135.3421-1-jferlan@redhat.com> References: <20170322142135.3421-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 15/22] util: Remove NONNULL(1) for virHostdevReAttachDomainDevices 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 22 Mar 2017 14:25:22 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Since the function handles a NULL 'mgr' condition, no need for the NONNULL Signed-off-by: John Ferlan --- src/util/virhostdev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virhostdev.h b/src/util/virhostdev.h index 7ee0b43..45d1c2e 100644 --- a/src/util/virhostdev.h +++ b/src/util/virhostdev.h @@ -164,7 +164,7 @@ virHostdevReAttachDomainDevices(virHostdevManagerPtr mg= r, virDomainDefPtr def, unsigned int flags, const char *oldStateDir) - ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3); + ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3); bool virHostdevIsSCSIDevice(virDomainHostdevDefPtr hostdev) ATTRIBUTE_NONNULL(1); --=20 2.9.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed May 1 22:31:28 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 149019269604931.282353600640818; Wed, 22 Mar 2017 07:24:56 -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 2FD6764A73; Wed, 22 Mar 2017 14:24:55 +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 0216E179D1; Wed, 22 Mar 2017 14:24:55 +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 A314318523D3; Wed, 22 Mar 2017 14:24:54 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v2MELngg026404 for ; Wed, 22 Mar 2017 10:21:49 -0400 Received: by smtp.corp.redhat.com (Postfix) id 60233179C4; Wed, 22 Mar 2017 14:21:49 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-76.phx2.redhat.com [10.3.116.76]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1F25C7B8FE for ; Wed, 22 Mar 2017 14:21:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 2FD6764A73 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.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 2FD6764A73 From: John Ferlan To: libvir-list@redhat.com Date: Wed, 22 Mar 2017 10:21:29 -0400 Message-Id: <20170322142135.3421-17-jferlan@redhat.com> In-Reply-To: <20170322142135.3421-1-jferlan@redhat.com> References: <20170322142135.3421-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 16/22] util: Remove NONNULL(1) for virNetDevOpenvswitchSetMigrateData 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.26]); Wed, 22 Mar 2017 14:24:55 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The code checks and handles a NULL 'migrate', so no need for NONNULL Signed-off-by: John Ferlan --- src/util/virnetdevopenvswitch.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virnetdevopenvswitch.h b/src/util/virnetdevopenvswitc= h.h index 4f62be1..021eba9 100644 --- a/src/util/virnetdevopenvswitch.h +++ b/src/util/virnetdevopenvswitch.h @@ -51,7 +51,7 @@ int virNetDevOpenvswitchGetMigrateData(char **migrate, co= nst char *ifname) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK; =20 int virNetDevOpenvswitchSetMigrateData(char *migrate, const char *ifname) - ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK; + ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK; =20 int virNetDevOpenvswitchInterfaceStats(const char *ifname, virDomainInterfaceStatsPtr stats) --=20 2.9.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed May 1 22:31:28 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 1490192699523429.99958015929667; Wed, 22 Mar 2017 07:24:59 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E79D4C04BD3F; Wed, 22 Mar 2017 14:24:58 +0000 (UTC) Received: from colo-mx.corp.redhat.com (unknown [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B8F2A4DA73; Wed, 22 Mar 2017 14:24:58 +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 6A52565D35; Wed, 22 Mar 2017 14:24:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v2MELo4D026409 for ; Wed, 22 Mar 2017 10:21:50 -0400 Received: by smtp.corp.redhat.com (Postfix) id 21913179C4; Wed, 22 Mar 2017 14:21:50 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-76.phx2.redhat.com [10.3.116.76]) by smtp.corp.redhat.com (Postfix) with ESMTP id D54F37B8F3 for ; Wed, 22 Mar 2017 14:21:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com E79D4C04BD3F Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.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 E79D4C04BD3F From: John Ferlan To: libvir-list@redhat.com Date: Wed, 22 Mar 2017 10:21:30 -0400 Message-Id: <20170322142135.3421-18-jferlan@redhat.com> In-Reply-To: <20170322142135.3421-1-jferlan@redhat.com> References: <20170322142135.3421-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 17/22] util: Remove NONNULL(1, 3, 4) from virTypedParamsFilter 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.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 22 Mar 2017 14:24:59 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The API checks each parameter for NULL anyway and would error, so need to add NONNULL on prototype. Signed-off-by: John Ferlan --- src/util/virtypedparam.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/util/virtypedparam.h b/src/util/virtypedparam.h index 7ab143f..59d5fbc 100644 --- a/src/util/virtypedparam.h +++ b/src/util/virtypedparam.h @@ -79,8 +79,7 @@ virTypedParamsFilter(virTypedParameterPtr params, int nparams, const char *name, virTypedParameterPtr **ret) - ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3) - ATTRIBUTE_NONNULL(4); + ATTRIBUTE_RETURN_CHECK; =20 =20 int virTypedParameterAssign(virTypedParameterPtr param, const char *name, --=20 2.9.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed May 1 22:31:28 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 1490192725624511.38777824767703; Wed, 22 Mar 2017 07:25:25 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0BBD9C04D2A9; Wed, 22 Mar 2017 14:25:25 +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 D2E257F389; Wed, 22 Mar 2017 14:25:24 +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 8031C18523CD; Wed, 22 Mar 2017 14:25:24 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v2MELof0026417 for ; Wed, 22 Mar 2017 10:21:50 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8C3A4179D1; Wed, 22 Mar 2017 14:21:50 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-76.phx2.redhat.com [10.3.116.76]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4B9D7179C4 for ; Wed, 22 Mar 2017 14:21:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 0BBD9C04D2A9 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.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 0BBD9C04D2A9 From: John Ferlan To: libvir-list@redhat.com Date: Wed, 22 Mar 2017 10:21:31 -0400 Message-Id: <20170322142135.3421-19-jferlan@redhat.com> In-Reply-To: <20170322142135.3421-1-jferlan@redhat.com> References: <20170322142135.3421-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 18/22] util: Remove NONNULL(2) for virNetDevBandwidthPlug 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 22 Mar 2017 14:25:25 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Since the code checks and handles a NULL 'net_bandwidth' parameter, so no need for NONNNULL. Signed-off-by: John Ferlan --- src/util/virnetdevbandwidth.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/util/virnetdevbandwidth.h b/src/util/virnetdevbandwidth.h index bceac2e..64f3537 100644 --- a/src/util/virnetdevbandwidth.h +++ b/src/util/virnetdevbandwidth.h @@ -59,8 +59,7 @@ int virNetDevBandwidthPlug(const char *brname, const virMacAddr *ifmac_ptr, virNetDevBandwidthPtr bandwidth, unsigned int id) - ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) - ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(4) + ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(4) ATTRIBUTE_RETURN_CHECK; =20 int virNetDevBandwidthUnplug(const char *brname, --=20 2.9.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed May 1 22:31:28 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 1490192627502927.9747665594264; Wed, 22 Mar 2017 07:23:47 -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 519E9C04D2A9; Wed, 22 Mar 2017 14:23:46 +0000 (UTC) Received: from colo-mx.corp.redhat.com (unknown [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 20335179C4; Wed, 22 Mar 2017 14:23:46 +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 BF5A265D29; Wed, 22 Mar 2017 14:23:45 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v2MELpnv026422 for ; Wed, 22 Mar 2017 10:21:51 -0400 Received: by smtp.corp.redhat.com (Postfix) id F392C179D1; Wed, 22 Mar 2017 14:21:50 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-76.phx2.redhat.com [10.3.116.76]) by smtp.corp.redhat.com (Postfix) with ESMTP id B2FDD179C4 for ; Wed, 22 Mar 2017 14:21:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 519E9C04D2A9 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.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 519E9C04D2A9 From: John Ferlan To: libvir-list@redhat.com Date: Wed, 22 Mar 2017 10:21:32 -0400 Message-Id: <20170322142135.3421-20-jferlan@redhat.com> In-Reply-To: <20170322142135.3421-1-jferlan@redhat.com> References: <20170322142135.3421-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 19/22] util: Remove NONNULL(1) for virNetDevOpenvswitchGetVhostuserIfname 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.31]); Wed, 22 Mar 2017 14:23:47 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Since the code checks and handles a NULL 'path', no need for the NONNULL Signed-off-by: John Ferlan --- src/util/virnetdevopenvswitch.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virnetdevopenvswitch.h b/src/util/virnetdevopenvswitc= h.h index 021eba9..7380a2d 100644 --- a/src/util/virnetdevopenvswitch.h +++ b/src/util/virnetdevopenvswitch.h @@ -59,6 +59,6 @@ int virNetDevOpenvswitchInterfaceStats(const char *ifname, =20 int virNetDevOpenvswitchGetVhostuserIfname(const char *path, char **ifname) - ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK; + ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK; =20 #endif /* __VIR_NETDEV_OPENVSWITCH_H__ */ --=20 2.9.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed May 1 22:31:28 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 1490192631083563.5268234593333; Wed, 22 Mar 2017 07:23:51 -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 ECBCA65D17; Wed, 22 Mar 2017 14:23:49 +0000 (UTC) Received: from colo-mx.corp.redhat.com (unknown [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AABB27D503; Wed, 22 Mar 2017 14:23:49 +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 57F9065D36; Wed, 22 Mar 2017 14:23:49 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v2MELpLO026432 for ; Wed, 22 Mar 2017 10:21:51 -0400 Received: by smtp.corp.redhat.com (Postfix) id 69459179C4; Wed, 22 Mar 2017 14:21:51 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-76.phx2.redhat.com [10.3.116.76]) by smtp.corp.redhat.com (Postfix) with ESMTP id 27BDD7B8FD for ; Wed, 22 Mar 2017 14:21:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com ECBCA65D17 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.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 ECBCA65D17 From: John Ferlan To: libvir-list@redhat.com Date: Wed, 22 Mar 2017 10:21:33 -0400 Message-Id: <20170322142135.3421-21-jferlan@redhat.com> In-Reply-To: <20170322142135.3421-1-jferlan@redhat.com> References: <20170322142135.3421-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 20/22] util: Remove NONNULL's for virNetDevVPortProfile[Associate|Disassociate] 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.38]); Wed, 22 Mar 2017 14:23:50 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The source code will check for NULL arguments for 'macvtap_macaddr' and 'vmuuid', so no need for the NONNULL in the prototypes. Following the stack for both arguments to virNetDevVPortProfileOpSetLink also shows called functions would handle a NULL value. Additionally, modified the prototype to use the same 'macvtap_macaddr' name as the source code for consistency. Signed-off-by: John Ferlan --- src/util/virnetdevvportprofile.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/util/virnetdevvportprofile.h b/src/util/virnetdevvportprof= ile.h index dc3e643..b706c41 100644 --- a/src/util/virnetdevvportprofile.h +++ b/src/util/virnetdevvportprofile.h @@ -95,23 +95,21 @@ int virNetDevVPortProfileMerge3(virNetDevVPortProfilePt= r *result, =20 int virNetDevVPortProfileAssociate(const char *ifname, const virNetDevVPortProfile *virtPort, - const virMacAddr *macaddr, + const virMacAddr *macvtap_macaddr, const char *linkdev, int vf, const unsigned char *vmuuid, virNetDevVPortProfileOp vmOp, bool setlink_only) - ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(4) ATTRIBUTE_NONNULL(6) - ATTRIBUTE_RETURN_CHECK; + ATTRIBUTE_NONNULL(4) ATTRIBUTE_RETURN_CHECK; =20 int virNetDevVPortProfileDisassociate(const char *ifname, const virNetDevVPortProfile *virtPor= t, - const virMacAddr *macaddr, + const virMacAddr *macvtap_macaddr, const char *linkdev, int vf, virNetDevVPortProfileOp vmOp) - ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(4) - ATTRIBUTE_RETURN_CHECK; + ATTRIBUTE_NONNULL(4) ATTRIBUTE_RETURN_CHECK; =20 =20 #endif /* __VIR_NETDEV_VPORT_PROFILE_H__ */ --=20 2.9.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed May 1 22:31:28 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 1490192729259747.8878415378347; Wed, 22 Mar 2017 07:25:29 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9F5ABC1C5DF7; Wed, 22 Mar 2017 14:25:28 +0000 (UTC) Received: from colo-mx.corp.redhat.com (unknown [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 65E387DFCF; Wed, 22 Mar 2017 14:25:28 +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 1BBBF65D2F; Wed, 22 Mar 2017 14:25:28 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v2MELqcZ026442 for ; Wed, 22 Mar 2017 10:21:52 -0400 Received: by smtp.corp.redhat.com (Postfix) id 506A0179C4; Wed, 22 Mar 2017 14:21:52 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-76.phx2.redhat.com [10.3.116.76]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0F96F7B8FC for ; Wed, 22 Mar 2017 14:21:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 9F5ABC1C5DF7 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.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 9F5ABC1C5DF7 From: John Ferlan To: libvir-list@redhat.com Date: Wed, 22 Mar 2017 10:21:34 -0400 Message-Id: <20170322142135.3421-22-jferlan@redhat.com> In-Reply-To: <20170322142135.3421-1-jferlan@redhat.com> References: <20170322142135.3421-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 21/22] util: Remove NONNULL(1) for virNetDevMacVLanDeleteWithVPortProfile 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.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 22 Mar 2017 14:25:29 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Since the source code checks 'ifname' for NULL before using, the prototype doesn't need the NONNULL Signed-off-by: John Ferlan --- src/util/virnetdevmacvlan.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virnetdevmacvlan.h b/src/util/virnetdevmacvlan.h index 9a85a65..c40f23e 100644 --- a/src/util/virnetdevmacvlan.h +++ b/src/util/virnetdevmacvlan.h @@ -88,7 +88,7 @@ int virNetDevMacVLanDeleteWithVPortProfile(const char *if= name, int mode, virNetDevVPortProfilePtr virtPo= rtProfile, char *stateDir) - ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) + ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(6) ATTRIBUTE_RETURN_CHECK; =20 int virNetDevMacVLanRestartWithVPortProfile(const char *cr_ifname, --=20 2.9.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed May 1 22:31:28 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 1490192733143152.14303015580913; Wed, 22 Mar 2017 07:25:33 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3A26F2DC342; Wed, 22 Mar 2017 14:25:32 +0000 (UTC) Received: from colo-mx.corp.redhat.com (unknown [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 05AEF1724A; Wed, 22 Mar 2017 14:25:32 +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 8E38865D35; Wed, 22 Mar 2017 14:25:31 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v2MELrtx026449 for ; Wed, 22 Mar 2017 10:21:53 -0400 Received: by smtp.corp.redhat.com (Postfix) id 01D687B8FB; Wed, 22 Mar 2017 14:21:53 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-76.phx2.redhat.com [10.3.116.76]) by smtp.corp.redhat.com (Postfix) with ESMTP id B49F47B8F3 for ; Wed, 22 Mar 2017 14:21:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 3A26F2DC342 Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.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 3A26F2DC342 From: John Ferlan To: libvir-list@redhat.com Date: Wed, 22 Mar 2017 10:21:35 -0400 Message-Id: <20170322142135.3421-23-jferlan@redhat.com> In-Reply-To: <20170322142135.3421-1-jferlan@redhat.com> References: <20170322142135.3421-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 22/22] cpu: Remove NONNULL(1) for cpuBaseline 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.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Wed, 22 Mar 2017 14:25:33 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Since the code checks and handles a NULL 'cpus' anyway, so no need for the NONNULL. Signed-off-by: John Ferlan --- src/cpu/cpu.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/cpu/cpu.h b/src/cpu/cpu.h index 7d6d3e9..d23409a 100644 --- a/src/cpu/cpu.h +++ b/src/cpu/cpu.h @@ -195,8 +195,7 @@ cpuBaseline (virCPUDefPtr *cpus, unsigned int ncpus, const char **models, unsigned int nmodels, - unsigned int flags) - ATTRIBUTE_NONNULL(1); + unsigned int flags); =20 int virCPUUpdate(virArch arch, --=20 2.9.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list