From nobody Tue May 7 04:07:52 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.zohomail.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 1536828943702262.81518090451425; Thu, 13 Sep 2018 01:55:43 -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 96DCD285B4; Thu, 13 Sep 2018 08:55:40 +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 D150D5D9C9; Thu, 13 Sep 2018 08:55:39 +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 16327181A12E; Thu, 13 Sep 2018 08:55:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w8D8tZ3S002782 for ; Thu, 13 Sep 2018 04:55:35 -0400 Received: by smtp.corp.redhat.com (Postfix) id 771BF60BEC; Thu, 13 Sep 2018 08:55:35 +0000 (UTC) Received: from mx1.redhat.com (ext-mx03.extmail.prod.ext.phx2.redhat.com [10.5.110.27]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 66F9760BE5 for ; Thu, 13 Sep 2018 08:55:33 +0000 (UTC) Received: from m97134.mail.qiye.163.com (m97134.mail.qiye.163.com [220.181.97.134]) by mx1.redhat.com (Postfix) with ESMTP id 15B9F811A4 for ; Thu, 13 Sep 2018 08:55:31 +0000 (UTC) Received: from localhost.localdomain (unknown [58.56.27.130]) by smtp5 (Coremail) with SMTP id huCowACHxWL+JZpbTfvyAQ--.224S3; Thu, 13 Sep 2018 16:55:28 +0800 (CST) From: Shi Lei To: libvir-list@redhat.com Date: Thu, 13 Sep 2018 16:55:19 +0800 Message-Id: <20180913085524.3520-2-shi_lei@massclouds.com> In-Reply-To: <20180913085524.3520-1-shi_lei@massclouds.com> References: <20180913085524.3520-1-shi_lei@massclouds.com> X-CM-TRANSID: huCowACHxWL+JZpbTfvyAQ--.224S3 X-Coremail-Antispam: 1Uf129KBjDUn29KB7ZKAUJUUUU8529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvjTRNHUDUUUUU X-Originating-IP: [58.56.27.130] X-CM-SenderInfo: pvklsz1hl6ztxvvfz0xxgvhudrp/1tbiAwDAT1illUjkzwAAsH X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 212 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 13 Sep 2018 08:55:32 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 13 Sep 2018 08:55:32 +0000 (UTC) for IP:'220.181.97.134' DOMAIN:'m97134.mail.qiye.163.com' HELO:'m97134.mail.qiye.163.com' FROM:'shi_lei@massclouds.com' RCPT:'' X-RedHat-Spam-Score: -0.01 (RCVD_IN_DNSWL_NONE) 220.181.97.134 m97134.mail.qiye.163.com 220.181.97.134 m97134.mail.qiye.163.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.27 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCHv2 1/6] build-aux:check-spacing.pl: Introduce syntax-check rule for incorrect indentation and blank first line in function body 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.30]); Thu, 13 Sep 2018 08:55:41 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" This patch add syntax-check rule for incorrect indentation and blank first line in function body by changing check-spacing.pl. For efficiency, it only checks the first line of function body. But it's enough for most cases. Signed-off-by: Shi Lei --- build-aux/check-spacing.pl | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/build-aux/check-spacing.pl b/build-aux/check-spacing.pl index ca8b434..da9a58b 100755 --- a/build-aux/check-spacing.pl +++ b/build-aux/check-spacing.pl @@ -31,6 +31,7 @@ foreach my $file (@ARGV) { my $cb_linenum =3D 0; my $cb_code =3D ""; my $cb_scolon =3D 0; + my $fn_linenum =3D 0; =20 open FILE, $file; =20 @@ -50,6 +51,27 @@ foreach my $file (@ARGV) { =20 next if $data =3D~ /^#/; =20 + # Detect start of function block + if ($data =3D~ /^{$/) { + $fn_linenum =3D $.; + } + + # Handle first line of function block + if ($fn_linenum && $fn_linenum !=3D $.) { + if ($data =3D~ /^\s*$/) { + print "Blank line before content in function body:\n"; + print "$file:$.:\n$line"; + $ret =3D 1; + } elsif ($data !~ /^[ ]{4}\S/) { + unless ($data =3D~ /^[ ]\w+:$/ || $data =3D~ /^}/) { + print "Incorrect indentation in function body:\n"; + print "$file:$.:\n$line"; + $ret =3D 1; + } + } + $fn_linenum =3D 0; + } + # Kill contents of multi-line comments # and detect end of multi-line comments if ($incomment) { --=20 2.17.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Tue May 7 04:07:52 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.zohomail.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 1536828943880909.3106724764755; Thu, 13 Sep 2018 01:55:43 -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 26F07356E8; Thu, 13 Sep 2018 08:55:41 +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 92A2660BE0; Thu, 13 Sep 2018 08:55:40 +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 1B541181A12F; Thu, 13 Sep 2018 08:55:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w8D8tYNd002771 for ; Thu, 13 Sep 2018 04:55:34 -0400 Received: by smtp.corp.redhat.com (Postfix) id AE59F608E6; Thu, 13 Sep 2018 08:55:34 +0000 (UTC) Received: from mx1.redhat.com (ext-mx14.extmail.prod.ext.phx2.redhat.com [10.5.110.43]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A4E33608E0 for ; Thu, 13 Sep 2018 08:55:34 +0000 (UTC) Received: from m97134.mail.qiye.163.com (m97134.mail.qiye.163.com [220.181.97.134]) by mx1.redhat.com (Postfix) with ESMTP id 51E4B300286B for ; Thu, 13 Sep 2018 08:55:30 +0000 (UTC) Received: from localhost.localdomain (unknown [58.56.27.130]) by smtp5 (Coremail) with SMTP id huCowACHxWL+JZpbTfvyAQ--.224S4; Thu, 13 Sep 2018 16:55:28 +0800 (CST) From: Shi Lei To: libvir-list@redhat.com Date: Thu, 13 Sep 2018 16:55:20 +0800 Message-Id: <20180913085524.3520-3-shi_lei@massclouds.com> In-Reply-To: <20180913085524.3520-1-shi_lei@massclouds.com> References: <20180913085524.3520-1-shi_lei@massclouds.com> X-CM-TRANSID: huCowACHxWL+JZpbTfvyAQ--.224S4 X-Coremail-Antispam: 1Uf129KBjvAXoW3tFyrKry5AF13Gr15ZFy8Grg_yoW8WF1xKo Z3Xr42vw4Fg3yUZF4Fkw4xWrZrZasYgFW3Xr45tFWqka1xArWUCr4Ikw13W3yFqFyagrW3 u3W0q3W3WF4xJrs5n29KB7ZKAUJUUUU8529EdanIXcx71UUUUU7v73VFW2AGmfu7bjvjm3 AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvjTRNHUDUUUUU X-Originating-IP: [58.56.27.130] X-CM-SenderInfo: pvklsz1hl6ztxvvfz0xxgvhudrp/1tbifQHAT1rpNlGtYAAAsq X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 212 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Thu, 13 Sep 2018 08:55:32 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Thu, 13 Sep 2018 08:55:32 +0000 (UTC) for IP:'220.181.97.134' DOMAIN:'m97134.mail.qiye.163.com' HELO:'m97134.mail.qiye.163.com' FROM:'shi_lei@massclouds.com' RCPT:'' X-RedHat-Spam-Score: -0.01 (RCVD_IN_DNSWL_NONE) 220.181.97.134 m97134.mail.qiye.163.com 220.181.97.134 m97134.mail.qiye.163.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.43 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCHv2 2/6] src: fix incorrect indentation in function body by checking first line 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.30]); Thu, 13 Sep 2018 08:55:41 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Shi Lei --- src/bhyve/bhyve_conf.c | 6 +-- src/bhyve/bhyve_driver.c | 32 ++++++------ src/conf/domain_conf.c | 2 +- src/cpu/cpu_s390.c | 84 +++++++++++++++---------------- src/esx/esx_vi_types.c | 2 +- src/qemu/qemu_domain_address.c | 85 ++++++++++++++++---------------- src/util/vircommand.c | 6 +-- src/util/virnetdev.c | 46 ++++++++--------- src/util/virnetdevmacvlan.c | 10 ++-- src/util/virnetdevvportprofile.c | 2 +- src/util/virutil.c | 2 +- src/vbox/vbox_tmpl.c | 8 +-- src/xenconfig/xen_common.c | 10 ++-- 13 files changed, 148 insertions(+), 147 deletions(-) diff --git a/src/bhyve/bhyve_conf.c b/src/bhyve/bhyve_conf.c index 153de7b..60baa2e 100644 --- a/src/bhyve/bhyve_conf.c +++ b/src/bhyve/bhyve_conf.c @@ -36,10 +36,10 @@ static void virBhyveDriverConfigDispose(void *obj); =20 static int virBhyveConfigOnceInit(void) { - if (!VIR_CLASS_NEW(virBhyveDriverConfig, virClassForObject())) - return -1; + if (!VIR_CLASS_NEW(virBhyveDriverConfig, virClassForObject())) + return -1; =20 - return 0; + return 0; } =20 VIR_ONCE_GLOBAL_INIT(virBhyveConfig) diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c index 9284b51..c9f58e1 100644 --- a/src/bhyve/bhyve_driver.c +++ b/src/bhyve/bhyve_driver.c @@ -197,27 +197,27 @@ bhyveConnectOpen(virConnectPtr conn, virConfPtr conf ATTRIBUTE_UNUSED, unsigned int flags) { - virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR); + virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR); =20 - if (STRNEQ(conn->uri->path, "/system")) { - virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unexpected bhyve URI path '%s', try bhyve:///sy= stem"), - conn->uri->path); - return VIR_DRV_OPEN_ERROR; - } + if (STRNEQ(conn->uri->path, "/system")) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("Unexpected bhyve URI path '%s', try bhyve:///sys= tem"), + conn->uri->path); + return VIR_DRV_OPEN_ERROR; + } =20 - if (bhyve_driver =3D=3D NULL) { - virReportError(VIR_ERR_INTERNAL_ERROR, - "%s", _("bhyve state driver is not active")); - return VIR_DRV_OPEN_ERROR; - } + if (bhyve_driver =3D=3D NULL) { + virReportError(VIR_ERR_INTERNAL_ERROR, + "%s", _("bhyve state driver is not active")); + return VIR_DRV_OPEN_ERROR; + } =20 - if (virConnectOpenEnsureACL(conn) < 0) - return VIR_DRV_OPEN_ERROR; + if (virConnectOpenEnsureACL(conn) < 0) + return VIR_DRV_OPEN_ERROR; =20 - conn->privateData =3D bhyve_driver; + conn->privateData =3D bhyve_driver; =20 - return VIR_DRV_OPEN_SUCCESS; + return VIR_DRV_OPEN_SUCCESS; } =20 static int diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 409a229..b08e90e 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -14430,7 +14430,7 @@ virDomainNVRAMDefParseXML(virDomainXMLOptionPtr xml= opt, xmlNodePtr node, unsigned int flags) { - virDomainNVRAMDefPtr def; + virDomainNVRAMDefPtr def; =20 if (VIR_ALLOC(def) < 0) return NULL; diff --git a/src/cpu/cpu_s390.c b/src/cpu/cpu_s390.c index 3d10f92..1abbb58 100644 --- a/src/cpu/cpu_s390.c +++ b/src/cpu/cpu_s390.c @@ -48,50 +48,50 @@ static int virCPUs390Update(virCPUDefPtr guest, const virCPUDef *host) { - virCPUDefPtr updated =3D NULL; - int ret =3D -1; - size_t i; - - if (guest->match =3D=3D VIR_CPU_MATCH_MINIMUM) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("match mode %s not supported"), - virCPUMatchTypeToString(guest->match)); - goto cleanup; - } - - if (guest->mode !=3D VIR_CPU_MODE_HOST_MODEL) { - ret =3D 0; - goto cleanup; - } - - if (!host) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("unknown host CPU model")); - goto cleanup; - } - - if (!(updated =3D virCPUDefCopyWithoutModel(guest))) - goto cleanup; - - updated->mode =3D VIR_CPU_MODE_CUSTOM; - if (virCPUDefCopyModel(updated, host, true) < 0) - goto cleanup; - - for (i =3D 0; i < guest->nfeatures; i++) { - if (virCPUDefUpdateFeature(updated, - guest->features[i].name, - guest->features[i].policy) < 0) - goto cleanup; - } - - virCPUDefStealModel(guest, updated, false); - guest->mode =3D VIR_CPU_MODE_CUSTOM; - guest->match =3D VIR_CPU_MATCH_EXACT; - ret =3D 0; + virCPUDefPtr updated =3D NULL; + int ret =3D -1; + size_t i; + + if (guest->match =3D=3D VIR_CPU_MATCH_MINIMUM) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("match mode %s not supported"), + virCPUMatchTypeToString(guest->match)); + goto cleanup; + } + + if (guest->mode !=3D VIR_CPU_MODE_HOST_MODEL) { + ret =3D 0; + goto cleanup; + } + + if (!host) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("unknown host CPU model")); + goto cleanup; + } + + if (!(updated =3D virCPUDefCopyWithoutModel(guest))) + goto cleanup; + + updated->mode =3D VIR_CPU_MODE_CUSTOM; + if (virCPUDefCopyModel(updated, host, true) < 0) + goto cleanup; + + for (i =3D 0; i < guest->nfeatures; i++) { + if (virCPUDefUpdateFeature(updated, + guest->features[i].name, + guest->features[i].policy) < 0) + goto cleanup; + } + + virCPUDefStealModel(guest, updated, false); + guest->mode =3D VIR_CPU_MODE_CUSTOM; + guest->match =3D VIR_CPU_MATCH_EXACT; + ret =3D 0; =20 cleanup: - virCPUDefFree(updated); - return ret; + virCPUDefFree(updated); + return ret; } =20 =20 diff --git a/src/esx/esx_vi_types.c b/src/esx/esx_vi_types.c index 7b234f0..a21a329 100644 --- a/src/esx/esx_vi_types.c +++ b/src/esx/esx_vi_types.c @@ -1781,7 +1781,7 @@ ESX_VI__TEMPLATE__LIST__APPEND(Event) /* esxVI_Event_CastFromAnyType */ ESX_VI__TEMPLATE__DYNAMIC_CAST_FROM_ANY_TYPE(Event, { - case esxVI_Type_Other: + case esxVI_Type_Other: /* Just accept everything here */ break; }) diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index 24fdf12..8f83ae2 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -2301,48 +2301,49 @@ qemuDomainAddressFindNewTargetIndex(virDomainDefPtr= def) static int qemuDomainAddressFindNewBusNr(virDomainDefPtr def) { -/* Try to find a nice default for busNr for a new pci-expander-bus. - * This is a bit tricky, since you need to satisfy the following: - * - * 1) There need to be enough unused bus numbers between busNr of this - * bus and busNr of the next highest bus for the guest to assign a - * unique bus number to each PCI bus that is a child of this - * bus. Each PCI controller. On top of this, the pxb device (which - * implements the pci-expander-bus) includes a pci-bridge within - * it, and that bridge also uses one bus number (so each pxb device - * requires at least 2 bus numbers). - * - * 2) There need to be enough bus numbers *below* this for all the - * child controllers of the pci-expander-bus with the next lower - * busNr (or the pci-root bus if there are no lower - * pci-expander-buses). - * - * 3) If at all possible, we want to avoid needing to change the busNr - * of a bus in the future, as that changes the guest's device ABI, - * which could potentially lead to issues with a guest OS that is - * picky about such things. - * - * Due to the impossibility of predicting what might be added to the - * config in the future, we can't make a foolproof choice, but since - * a pci-expander-bus (pxb) has slots for 32 devices, and the only - * practical use for it is to assign real devices on a particular - * NUMA node in the host, it's reasonably safe to assume it should - * never need any additional child buses (probably only a few of the - * 32 will ever be used). So for pci-expander-bus we find the lowest - * existing busNr, and set this one to the current lowest - 2 (one - * for the pxb, one for the intergrated pci-bridge), thus leaving the - * maximum possible bus numbers available for other buses plugged - * into pci-root (i.e. pci-bridges and other - * pci-expander-buses). Anyone who needs more than 32 devices - * descended from one pci-expander-bus should set the busNr manually - * in the config. - * - * There is room for more error checking here - in particular we - * can/should determine the ultimate parent (root-bus) of each PCI - * controller and determine if there is enough space for all the - * buses within the current range allotted to the bus just prior to - * this one. - */ + /* Try to find a nice default for busNr for a new pci-expander-bus. + * This is a bit tricky, since you need to satisfy the following: + * + * 1) There need to be enough unused bus numbers between busNr of this + * bus and busNr of the next highest bus for the guest to assign a + * unique bus number to each PCI bus that is a child of this + * bus. Each PCI controller. On top of this, the pxb device (which + * implements the pci-expander-bus) includes a pci-bridge within + * it, and that bridge also uses one bus number (so each pxb device + * requires at least 2 bus numbers). + * + * 2) There need to be enough bus numbers *below* this for all the + * child controllers of the pci-expander-bus with the next lower + * busNr (or the pci-root bus if there are no lower + * pci-expander-buses). + * + * 3) If at all possible, we want to avoid needing to change the busNr + * of a bus in the future, as that changes the guest's device ABI, + * which could potentially lead to issues with a guest OS that is + * picky about such things. + * + * Due to the impossibility of predicting what might be added to the + * config in the future, we can't make a foolproof choice, but since + * a pci-expander-bus (pxb) has slots for 32 devices, and the only + * practical use for it is to assign real devices on a particular + * NUMA node in the host, it's reasonably safe to assume it should + * never need any additional child buses (probably only a few of the + * 32 will ever be used). So for pci-expander-bus we find the lowest + * existing busNr, and set this one to the current lowest - 2 (one + * for the pxb, one for the intergrated pci-bridge), thus leaving the + * maximum possible bus numbers available for other buses plugged + * into pci-root (i.e. pci-bridges and other + * pci-expander-buses). Anyone who needs more than 32 devices + * descended from one pci-expander-bus should set the busNr manually + * in the config. + * + * There is room for more error checking here - in particular we + * can/should determine the ultimate parent (root-bus) of each PCI + * controller and determine if there is enough space for all the + * buses within the current range allotted to the bus just prior to + * this one. + */ + size_t i; int lowestBusNr =3D 256; =20 diff --git a/src/util/vircommand.c b/src/util/vircommand.c index 8be3fdf..9a99275 100644 --- a/src/util/vircommand.c +++ b/src/util/vircommand.c @@ -2872,10 +2872,10 @@ virCommandFree(virCommandPtr cmd) void virCommandDoAsyncIO(virCommandPtr cmd) { - if (!cmd || cmd->has_error) - return; + if (!cmd || cmd->has_error) + return; =20 - cmd->flags |=3D VIR_EXEC_ASYNC_IO | VIR_EXEC_NONBLOCK; + cmd->flags |=3D VIR_EXEC_ASYNC_IO | VIR_EXEC_NONBLOCK; } =20 /** diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c index a892251..c30a600 100644 --- a/src/util/virnetdev.c +++ b/src/util/virnetdev.c @@ -295,36 +295,36 @@ virNetDevSetMACInternal(const char *ifname, const virMacAddr *macaddr, bool quiet) { - struct ifreq ifr; - struct sockaddr_dl sdl; - char mac[VIR_MAC_STRING_BUFLEN + 1] =3D ":"; - VIR_AUTOCLOSE s =3D -1; - - if ((s =3D virNetDevSetupControl(ifname, &ifr)) < 0) - return -1; + struct ifreq ifr; + struct sockaddr_dl sdl; + char mac[VIR_MAC_STRING_BUFLEN + 1] =3D ":"; + VIR_AUTOCLOSE s =3D -1; =20 - virMacAddrFormat(macaddr, mac + 1); - sdl.sdl_len =3D sizeof(sdl); - link_addr(mac, &sdl); + if ((s =3D virNetDevSetupControl(ifname, &ifr)) < 0) + return -1; =20 - memcpy(ifr.ifr_addr.sa_data, sdl.sdl_data, VIR_MAC_BUFLEN); - ifr.ifr_addr.sa_len =3D VIR_MAC_BUFLEN; + virMacAddrFormat(macaddr, mac + 1); + sdl.sdl_len =3D sizeof(sdl); + link_addr(mac, &sdl); =20 - if (ioctl(s, SIOCSIFLLADDR, &ifr) < 0) { - if (quiet && - (errno =3D=3D EADDRNOTAVAIL || errno =3D=3D EPERM)) { - VIR_DEBUG("SIOCSIFLLADDR %s MAC=3D%s - Fail", ifname, mac = + 1); - return -1; - } + memcpy(ifr.ifr_addr.sa_data, sdl.sdl_data, VIR_MAC_BUFLEN); + ifr.ifr_addr.sa_len =3D VIR_MAC_BUFLEN; =20 - virReportSystemError(errno, - _("Cannot set interface MAC to %s on '%s'= "), - mac + 1, ifname); + if (ioctl(s, SIOCSIFLLADDR, &ifr) < 0) { + if (quiet && + (errno =3D=3D EADDRNOTAVAIL || errno =3D=3D EPERM)) { + VIR_DEBUG("SIOCSIFLLADDR %s MAC=3D%s - Fail", ifname, mac + 1); return -1; } =20 - VIR_DEBUG("SIOCSIFLLADDR %s MAC=3D%s - Success", ifname, mac + 1); - return 0; + virReportSystemError(errno, + _("Cannot set interface MAC to %s on '%s'"), + mac + 1, ifname); + return -1; + } + + VIR_DEBUG("SIOCSIFLLADDR %s MAC=3D%s - Success", ifname, mac + 1); + return 0; } =20 =20 diff --git a/src/util/virnetdevmacvlan.c b/src/util/virnetdevmacvlan.c index a66ab59..eff3ef9 100644 --- a/src/util/virnetdevmacvlan.c +++ b/src/util/virnetdevmacvlan.c @@ -546,11 +546,11 @@ virNetDevMacVLanVPortProfileCallback(struct nlmsghdr = *hdr, bool *handled, void *opaque) { - struct nla_policy ifla_vf_policy[IFLA_VF_MAX + 1] =3D { - [IFLA_VF_MAC] =3D {.minlen =3D sizeof(struct ifla_vf_mac), - .maxlen =3D sizeof(struct ifla_vf_mac)}, - [IFLA_VF_VLAN] =3D {.minlen =3D sizeof(struct ifla_vf_vlan), - .maxlen =3D sizeof(struct ifla_vf_vlan)}, + struct nla_policy ifla_vf_policy[IFLA_VF_MAX + 1] =3D { + [IFLA_VF_MAC] =3D {.minlen =3D sizeof(struct ifla_vf_mac), + .maxlen =3D sizeof(struct ifla_vf_mac)}, + [IFLA_VF_VLAN] =3D {.minlen =3D sizeof(struct ifla_vf_vlan), + .maxlen =3D sizeof(struct ifla_vf_vlan)}, }; =20 struct nla_policy ifla_port_policy[IFLA_PORT_MAX + 1] =3D { diff --git a/src/util/virnetdevvportprofile.c b/src/util/virnetdevvportprof= ile.c index 3ebf757..215d649 100644 --- a/src/util/virnetdevvportprofile.c +++ b/src/util/virnetdevvportprofile.c @@ -451,7 +451,7 @@ int virNetDevVPortProfileMerge3(virNetDevVPortProfilePt= r *result, =20 static struct nla_policy ifla_port_policy[IFLA_PORT_MAX + 1] =3D { - [IFLA_PORT_RESPONSE] =3D { .type =3D NLA_U16 }, + [IFLA_PORT_RESPONSE] =3D { .type =3D NLA_U16 }, }; =20 static uint32_t diff --git a/src/util/virutil.c b/src/util/virutil.c index a908422..2900836 100644 --- a/src/util/virutil.c +++ b/src/util/virutil.c @@ -940,7 +940,7 @@ char *virGetUserConfigDirectory(void) =20 char *virGetUserCacheDirectory(void) { - return virGetXDGDirectory("XDG_CACHE_HOME", ".cache"); + return virGetXDGDirectory("XDG_CACHE_HOME", ".cache"); } =20 char *virGetUserRuntimeDirectory(void) diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c index 88792c9..53d4fd7 100644 --- a/src/vbox/vbox_tmpl.c +++ b/src/vbox/vbox_tmpl.c @@ -1253,11 +1253,11 @@ _systemPropertiesGetMaxNetworkAdapters(ISystemPrope= rties *systemProperties, PRUi PRUint32 *maxNetworkAdapters) { #if VBOX_API_VERSION < 4001000 - return systemProperties->vtbl->GetNetworkAdapterCount(systemProper= ties, - maxNetworkAd= apters); + return systemProperties->vtbl->GetNetworkAdapterCount(systemProperties, + maxNetworkAdapte= rs); #else /* VBOX_API_VERSION >=3D 4000000 */ - return systemProperties->vtbl->GetMaxNetworkAdapters(systemPropert= ies, chipset, - maxNetworkAda= pters); + return systemProperties->vtbl->GetMaxNetworkAdapters(systemProperties,= chipset, + maxNetworkAdapter= s); #endif /* VBOX_API_VERSION >=3D 4000000 */ } =20 diff --git a/src/xenconfig/xen_common.c b/src/xenconfig/xen_common.c index fdca984..be9e232 100644 --- a/src/xenconfig/xen_common.c +++ b/src/xenconfig/xen_common.c @@ -1911,11 +1911,11 @@ xenFormatVif(virConfPtr conf, virDomainDefPtr def, const char *vif_typename) { - virConfValuePtr netVal =3D NULL; - size_t i; - int hvm =3D def->os.type =3D=3D VIR_DOMAIN_OSTYPE_HVM; + virConfValuePtr netVal =3D NULL; + size_t i; + int hvm =3D def->os.type =3D=3D VIR_DOMAIN_OSTYPE_HVM; =20 - if (VIR_ALLOC(netVal) < 0) + if (VIR_ALLOC(netVal) < 0) goto cleanup; netVal->type =3D VIR_CONF_LIST; netVal->list =3D NULL; @@ -1923,7 +1923,7 @@ xenFormatVif(virConfPtr conf, for (i =3D 0; i < def->nnets; i++) { if (xenFormatNet(conn, netVal, def->nets[i], hvm, vif_typename) < 0) - goto cleanup; + goto cleanup; } =20 if (netVal->list !=3D NULL) { --=20 2.17.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Tue May 7 04:07:52 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.zohomail.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 1536828999835921.9965679347606; Thu, 13 Sep 2018 01:56:39 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 290D62C9710; Thu, 13 Sep 2018 08:56:37 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E79A2308BDA1; Thu, 13 Sep 2018 08:56:36 +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 A198B4A464; Thu, 13 Sep 2018 08:56:36 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w8D8tZM1002788 for ; Thu, 13 Sep 2018 04:55:35 -0400 Received: by smtp.corp.redhat.com (Postfix) id E92F93091323; Thu, 13 Sep 2018 08:55:35 +0000 (UTC) Received: from mx1.redhat.com (ext-mx13.extmail.prod.ext.phx2.redhat.com [10.5.110.42]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DEDB3309132E for ; Thu, 13 Sep 2018 08:55:33 +0000 (UTC) Received: from m97134.mail.qiye.163.com (m97134.mail.qiye.163.com [220.181.97.134]) by mx1.redhat.com (Postfix) with ESMTP id 1233C310E999 for ; Thu, 13 Sep 2018 08:55:31 +0000 (UTC) Received: from localhost.localdomain (unknown [58.56.27.130]) by smtp5 (Coremail) with SMTP id huCowACHxWL+JZpbTfvyAQ--.224S5; Thu, 13 Sep 2018 16:55:29 +0800 (CST) From: Shi Lei To: libvir-list@redhat.com Date: Thu, 13 Sep 2018 16:55:21 +0800 Message-Id: <20180913085524.3520-4-shi_lei@massclouds.com> In-Reply-To: <20180913085524.3520-1-shi_lei@massclouds.com> References: <20180913085524.3520-1-shi_lei@massclouds.com> X-CM-TRANSID: huCowACHxWL+JZpbTfvyAQ--.224S5 X-Coremail-Antispam: 1Uf129KBjvJXoW3urW7try7Cw1DZFyDCFWfXwb_yoWkuw17pF Z8AF1vyrW8tr4rZr1DKr4kWa4Y9rySkFy2yw4jvw4Iv3Z8W34UWw4rWF1ruw13AFWUua4a va10qFykCF45XFJanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x0pRQdbUUUUUU= X-Originating-IP: [58.56.27.130] X-CM-SenderInfo: pvklsz1hl6ztxvvfz0xxgvhudrp/1tbiEQHAT1nxsGCobwAAsg X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 212 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Thu, 13 Sep 2018 08:55:32 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Thu, 13 Sep 2018 08:55:32 +0000 (UTC) for IP:'220.181.97.134' DOMAIN:'m97134.mail.qiye.163.com' HELO:'m97134.mail.qiye.163.com' FROM:'shi_lei@massclouds.com' RCPT:'' X-RedHat-Spam-Score: -0.01 (RCVD_IN_DNSWL_NONE) 220.181.97.134 m97134.mail.qiye.163.com 220.181.97.134 m97134.mail.qiye.163.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.42 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.26 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCHv2 3/6] tests: fix incorrect indentation in function body by checking first line 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.84 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Thu, 13 Sep 2018 08:56:37 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Shi Lei --- tests/qemuxml2argvmock.c | 2 +- tests/sexpr2xmltest.c | 44 +++++++------- tests/virnettlshelpers.c | 18 +++--- tests/virshtest.c | 128 +++++++++++++++++++-------------------- tests/xml2sexprtest.c | 36 +++++------ 5 files changed, 114 insertions(+), 114 deletions(-) diff --git a/tests/qemuxml2argvmock.c b/tests/qemuxml2argvmock.c index 4b4a6f7..79152d9 100644 --- a/tests/qemuxml2argvmock.c +++ b/tests/qemuxml2argvmock.c @@ -66,7 +66,7 @@ virNumaIsAvailable(void) int virNumaGetMaxNode(void) { - return 7; + return 7; } =20 /* We shouldn't need to mock virNumaNodeIsAvailable() and *definitely* not diff --git a/tests/sexpr2xmltest.c b/tests/sexpr2xmltest.c index efe6411..9ff4ab3 100644 --- a/tests/sexpr2xmltest.c +++ b/tests/sexpr2xmltest.c @@ -21,37 +21,37 @@ static virDomainXMLOptionPtr xmlopt; static int testCompareFiles(const char *xml, const char *sexpr) { - char *sexprData =3D NULL; - char *gotxml =3D NULL; - int ret =3D -1; - virDomainDefPtr def =3D NULL; + char *sexprData =3D NULL; + char *gotxml =3D NULL; + int ret =3D -1; + virDomainDefPtr def =3D NULL; =20 - if (virTestLoadFile(sexpr, &sexprData) < 0) - goto fail; + if (virTestLoadFile(sexpr, &sexprData) < 0) + goto fail; =20 - if (!(def =3D xenParseSxprString(sexprData, - NULL, -1, caps, xmlopt))) - goto fail; + if (!(def =3D xenParseSxprString(sexprData, + NULL, -1, caps, xmlopt))) + goto fail; =20 - if (!virDomainDefCheckABIStability(def, def, xmlopt)) { - fprintf(stderr, "ABI stability check failed on %s", xml); - goto fail; - } + if (!virDomainDefCheckABIStability(def, def, xmlopt)) { + fprintf(stderr, "ABI stability check failed on %s", xml); + goto fail; + } =20 - if (!(gotxml =3D virDomainDefFormat(def, caps, 0))) - goto fail; + if (!(gotxml =3D virDomainDefFormat(def, caps, 0))) + goto fail; =20 - if (virTestCompareToFile(gotxml, xml) < 0) - goto fail; + if (virTestCompareToFile(gotxml, xml) < 0) + goto fail; =20 - ret =3D 0; + ret =3D 0; =20 fail: - VIR_FREE(sexprData); - VIR_FREE(gotxml); - virDomainDefFree(def); + VIR_FREE(sexprData); + VIR_FREE(gotxml); + virDomainDefFree(def); =20 - return ret; + return ret; } =20 struct testInfo { diff --git a/tests/virnettlshelpers.c b/tests/virnettlshelpers.c index 5c94f89..8cb8c3e 100644 --- a/tests/virnettlshelpers.c +++ b/tests/virnettlshelpers.c @@ -126,19 +126,19 @@ static void testTLSDerEncode(ASN1_TYPE src, const char *src_name, gnutls_datum_t * res) { - int size; - char *data =3D NULL; + int size; + char *data =3D NULL; =20 - size =3D 0; - asn1_der_coding(src, src_name, NULL, &size, NULL); + size =3D 0; + asn1_der_coding(src, src_name, NULL, &size, NULL); =20 - if (VIR_ALLOC_N(data, size) < 0) - abort(); + if (VIR_ALLOC_N(data, size) < 0) + abort(); =20 - asn1_der_coding(src, src_name, data, &size, NULL); + asn1_der_coding(src, src_name, data, &size, NULL); =20 - res->data =3D (unsigned char *)data; - res->size =3D size; + res->data =3D (unsigned char *)data; + res->size =3D size; } =20 =20 diff --git a/tests/virshtest.c b/tests/virshtest.c index 10cd0d3..078c6bf 100644 --- a/tests/virshtest.c +++ b/tests/virshtest.c @@ -44,18 +44,18 @@ static const char *domstate_fc4 =3D "running\n\n"; static int testFilterLine(char *buffer, const char *toRemove) { - char *start; - char *end; - - if (!(start =3D strstr(buffer, toRemove))) - return -1; - - if (!(end =3D strstr(start+1, "\n"))) { - *start =3D '\0'; - } else { - memmove(start, end, strlen(end)+1); - } - return 0; + char *start; + char *end; + + if (!(start =3D strstr(buffer, toRemove))) + return -1; + + if (!(end =3D strstr(start+1, "\n"))) { + *start =3D '\0'; + } else { + memmove(start, end, strlen(end)+1); + } + return 0; } =20 static int @@ -96,31 +96,31 @@ static char *custom_uri; =20 static int testCompareListDefault(const void *data ATTRIBUTE_UNUSED) { - const char *const argv[] =3D { VIRSH_DEFAULT, "list", NULL }; - const char *exp =3D "\ + const char *const argv[] =3D { VIRSH_DEFAULT, "list", NULL }; + const char *exp =3D "\ Id Name State \n\ ----------------------\n\ 1 test running \n\ \n"; - return testCompareOutputLit(exp, NULL, argv); + return testCompareOutputLit(exp, NULL, argv); } =20 static int testCompareListCustom(const void *data ATTRIBUTE_UNUSED) { - const char *const argv[] =3D { VIRSH_CUSTOM, "list", NULL }; - const char *exp =3D "\ + const char *const argv[] =3D { VIRSH_CUSTOM, "list", NULL }; + const char *exp =3D "\ Id Name State \n\ ----------------------\n\ 1 fv0 running \n\ 2 fc4 running \n\ \n"; - return testCompareOutputLit(exp, NULL, argv); + return testCompareOutputLit(exp, NULL, argv); } =20 static int testCompareNodeinfoDefault(const void *data ATTRIBUTE_UNUSED) { - const char *const argv[] =3D { VIRSH_DEFAULT, "nodeinfo", NULL }; - const char *exp =3D "\ + const char *const argv[] =3D { VIRSH_DEFAULT, "nodeinfo", NULL }; + const char *exp =3D "\ CPU model: i686\n\ CPU(s): 16\n\ CPU frequency: 1400 MHz\n\ @@ -130,17 +130,17 @@ Thread(s) per core: 2\n\ NUMA cell(s): 2\n\ Memory size: 3145728 KiB\n\ \n"; - return testCompareOutputLit(exp, NULL, argv); + return testCompareOutputLit(exp, NULL, argv); } =20 static int testCompareNodeinfoCustom(const void *data ATTRIBUTE_UNUSED) { - const char *const argv[] =3D { - VIRSH_CUSTOM, - "nodeinfo", - NULL - }; - const char *exp =3D "\ + const char *const argv[] =3D { + VIRSH_CUSTOM, + "nodeinfo", + NULL + }; + const char *exp =3D "\ CPU model: i986\n\ CPU(s): 50\n\ CPU frequency: 6000 MHz\n\ @@ -150,91 +150,91 @@ Thread(s) per core: 2\n\ NUMA cell(s): 4\n\ Memory size: 8192000 KiB\n\ \n"; - return testCompareOutputLit(exp, NULL, argv); + return testCompareOutputLit(exp, NULL, argv); } =20 static int testCompareDominfoByID(const void *data ATTRIBUTE_UNUSED) { - const char *const argv[] =3D { VIRSH_CUSTOM, "dominfo", "2", NULL }; - const char *exp =3D dominfo_fc4; - return testCompareOutputLit(exp, "\nCPU time:", argv); + const char *const argv[] =3D { VIRSH_CUSTOM, "dominfo", "2", NULL }; + const char *exp =3D dominfo_fc4; + return testCompareOutputLit(exp, "\nCPU time:", argv); } =20 static int testCompareDominfoByUUID(const void *data ATTRIBUTE_UNUSED) { - const char *const argv[] =3D { VIRSH_CUSTOM, "dominfo", DOM_UUID, NULL }; - const char *exp =3D dominfo_fc4; - return testCompareOutputLit(exp, "\nCPU time:", argv); + const char *const argv[] =3D { VIRSH_CUSTOM, "dominfo", DOM_UUID, NULL= }; + const char *exp =3D dominfo_fc4; + return testCompareOutputLit(exp, "\nCPU time:", argv); } =20 static int testCompareDominfoByName(const void *data ATTRIBUTE_UNUSED) { - const char *const argv[] =3D { VIRSH_CUSTOM, "dominfo", "fc4", NULL }; - const char *exp =3D dominfo_fc4; - return testCompareOutputLit(exp, "\nCPU time:", argv); + const char *const argv[] =3D { VIRSH_CUSTOM, "dominfo", "fc4", NULL }; + const char *exp =3D dominfo_fc4; + return testCompareOutputLit(exp, "\nCPU time:", argv); } =20 static int testCompareDomuuidByID(const void *data ATTRIBUTE_UNUSED) { - const char *const argv[] =3D { VIRSH_CUSTOM, "domuuid", "2", NULL }; - const char *exp =3D domuuid_fc4; - return testCompareOutputLit(exp, NULL, argv); + const char *const argv[] =3D { VIRSH_CUSTOM, "domuuid", "2", NULL }; + const char *exp =3D domuuid_fc4; + return testCompareOutputLit(exp, NULL, argv); } =20 static int testCompareDomuuidByName(const void *data ATTRIBUTE_UNUSED) { - const char *const argv[] =3D { VIRSH_CUSTOM, "domuuid", "fc4", NULL }; - const char *exp =3D domuuid_fc4; - return testCompareOutputLit(exp, NULL, argv); + const char *const argv[] =3D { VIRSH_CUSTOM, "domuuid", "fc4", NULL }; + const char *exp =3D domuuid_fc4; + return testCompareOutputLit(exp, NULL, argv); } =20 static int testCompareDomidByName(const void *data ATTRIBUTE_UNUSED) { - const char *const argv[] =3D { VIRSH_CUSTOM, "domid", "fc4", NULL }; - const char *exp =3D domid_fc4; - return testCompareOutputLit(exp, NULL, argv); + const char *const argv[] =3D { VIRSH_CUSTOM, "domid", "fc4", NULL }; + const char *exp =3D domid_fc4; + return testCompareOutputLit(exp, NULL, argv); } =20 static int testCompareDomidByUUID(const void *data ATTRIBUTE_UNUSED) { - const char *const argv[] =3D { VIRSH_CUSTOM, "domid", DOM_UUID, NULL }; - const char *exp =3D domid_fc4; - return testCompareOutputLit(exp, NULL, argv); + const char *const argv[] =3D { VIRSH_CUSTOM, "domid", DOM_UUID, NULL }; + const char *exp =3D domid_fc4; + return testCompareOutputLit(exp, NULL, argv); } =20 static int testCompareDomnameByID(const void *data ATTRIBUTE_UNUSED) { - const char *const argv[] =3D { VIRSH_CUSTOM, "domname", "2", NULL }; - const char *exp =3D domname_fc4; - return testCompareOutputLit(exp, NULL, argv); + const char *const argv[] =3D { VIRSH_CUSTOM, "domname", "2", NULL }; + const char *exp =3D domname_fc4; + return testCompareOutputLit(exp, NULL, argv); } =20 static int testCompareDomnameByUUID(const void *data ATTRIBUTE_UNUSED) { - const char *const argv[] =3D { VIRSH_CUSTOM, "domname", DOM_UUID, NULL }; - const char *exp =3D domname_fc4; - return testCompareOutputLit(exp, NULL, argv); + const char *const argv[] =3D { VIRSH_CUSTOM, "domname", DOM_UUID, NULL= }; + const char *exp =3D domname_fc4; + return testCompareOutputLit(exp, NULL, argv); } =20 static int testCompareDomstateByID(const void *data ATTRIBUTE_UNUSED) { - const char *const argv[] =3D { VIRSH_CUSTOM, "domstate", "2", NULL }; - const char *exp =3D domstate_fc4; - return testCompareOutputLit(exp, NULL, argv); + const char *const argv[] =3D { VIRSH_CUSTOM, "domstate", "2", NULL }; + const char *exp =3D domstate_fc4; + return testCompareOutputLit(exp, NULL, argv); } =20 static int testCompareDomstateByUUID(const void *data ATTRIBUTE_UNUSED) { - const char *const argv[] =3D { VIRSH_CUSTOM, "domstate", DOM_UUID, NULL = }; - const char *exp =3D domstate_fc4; - return testCompareOutputLit(exp, NULL, argv); + const char *const argv[] =3D { VIRSH_CUSTOM, "domstate", DOM_UUID, NUL= L }; + const char *exp =3D domstate_fc4; + return testCompareOutputLit(exp, NULL, argv); } =20 static int testCompareDomstateByName(const void *data ATTRIBUTE_UNUSED) { - const char *const argv[] =3D { VIRSH_CUSTOM, "domstate", "fc4", NULL }; - const char *exp =3D domstate_fc4; - return testCompareOutputLit(exp, NULL, argv); + const char *const argv[] =3D { VIRSH_CUSTOM, "domstate", "fc4", NULL }; + const char *exp =3D domstate_fc4; + return testCompareOutputLit(exp, NULL, argv); } =20 struct testInfo { diff --git a/tests/xml2sexprtest.c b/tests/xml2sexprtest.c index 3e4d1d1..98092d8 100644 --- a/tests/xml2sexprtest.c +++ b/tests/xml2sexprtest.c @@ -22,32 +22,32 @@ static virDomainXMLOptionPtr xmlopt; static int testCompareFiles(const char *xml, const char *sexpr) { - char *gotsexpr =3D NULL; - int ret =3D -1; - virDomainDefPtr def =3D NULL; + char *gotsexpr =3D NULL; + int ret =3D -1; + virDomainDefPtr def =3D NULL; =20 - if (!(def =3D virDomainDefParseFile(xml, caps, xmlopt, NULL, - VIR_DOMAIN_DEF_PARSE_INACTIVE))) - goto fail; + if (!(def =3D virDomainDefParseFile(xml, caps, xmlopt, NULL, + VIR_DOMAIN_DEF_PARSE_INACTIVE))) + goto fail; =20 - if (!virDomainDefCheckABIStability(def, def, xmlopt)) { - fprintf(stderr, "ABI stability check failed on %s", xml); - goto fail; - } + if (!virDomainDefCheckABIStability(def, def, xmlopt)) { + fprintf(stderr, "ABI stability check failed on %s", xml); + goto fail; + } =20 - if (!(gotsexpr =3D xenFormatSxpr(NULL, def))) - goto fail; + if (!(gotsexpr =3D xenFormatSxpr(NULL, def))) + goto fail; =20 - if (virTestCompareToFile(gotsexpr, sexpr) < 0) - goto fail; + if (virTestCompareToFile(gotsexpr, sexpr) < 0) + goto fail; =20 - ret =3D 0; + ret =3D 0; =20 fail: - VIR_FREE(gotsexpr); - virDomainDefFree(def); + VIR_FREE(gotsexpr); + virDomainDefFree(def); =20 - return ret; + return ret; } =20 struct testInfo { --=20 2.17.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Tue May 7 04:07:52 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.zohomail.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 15368289767501007.2669895702867; Thu, 13 Sep 2018 01:56:16 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A982A307D857; Thu, 13 Sep 2018 08:56:14 +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 4FD6F4531; Thu, 13 Sep 2018 08:56: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 EF33D181A139; Thu, 13 Sep 2018 08:56:13 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w8D8tZ0M002787 for ; Thu, 13 Sep 2018 04:55:35 -0400 Received: by smtp.corp.redhat.com (Postfix) id E6B4730912F4; Thu, 13 Sep 2018 08:55:35 +0000 (UTC) Received: from mx1.redhat.com (ext-mx18.extmail.prod.ext.phx2.redhat.com [10.5.110.47]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DF01F3091330 for ; Thu, 13 Sep 2018 08:55:35 +0000 (UTC) Received: from m97134.mail.qiye.163.com (m97134.mail.qiye.163.com [220.181.97.134]) by mx1.redhat.com (Postfix) with ESMTP id 93D4030A7B84 for ; Thu, 13 Sep 2018 08:55:31 +0000 (UTC) Received: from localhost.localdomain (unknown [58.56.27.130]) by smtp5 (Coremail) with SMTP id huCowACHxWL+JZpbTfvyAQ--.224S6; Thu, 13 Sep 2018 16:55:29 +0800 (CST) From: Shi Lei To: libvir-list@redhat.com Date: Thu, 13 Sep 2018 16:55:22 +0800 Message-Id: <20180913085524.3520-5-shi_lei@massclouds.com> In-Reply-To: <20180913085524.3520-1-shi_lei@massclouds.com> References: <20180913085524.3520-1-shi_lei@massclouds.com> X-CM-TRANSID: huCowACHxWL+JZpbTfvyAQ--.224S6 X-Coremail-Antispam: 1Uf129KBjvAXoW3KF45Jr45ur48CFWxWw1rJFb_yoW8CFy7Ao Z7Jr12gr1rWrWxZr92yr1fJFW7JFsxt3y5Xa10qFWkK3s7Ar1kurWDuF13XF95XryrtFy7 A3WUX34fJrs2krn3n29KB7ZKAUJUUUU8529EdanIXcx71UUUUU7v73VFW2AGmfu7bjvjm3 AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvjTRNHUDUUUUU X-Originating-IP: [58.56.27.130] X-CM-SenderInfo: pvklsz1hl6ztxvvfz0xxgvhudrp/1tbifgLAT1rpNP8JMgAAsw X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 212 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Thu, 13 Sep 2018 08:55:33 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Thu, 13 Sep 2018 08:55:33 +0000 (UTC) for IP:'220.181.97.134' DOMAIN:'m97134.mail.qiye.163.com' HELO:'m97134.mail.qiye.163.com' FROM:'shi_lei@massclouds.com' RCPT:'' X-RedHat-Spam-Score: -0.01 (RCVD_IN_DNSWL_NONE) 220.181.97.134 m97134.mail.qiye.163.com 220.181.97.134 m97134.mail.qiye.163.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.47 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.26 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCHv2 4/6] src: remove blank first line in function body 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.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Thu, 13 Sep 2018 08:56:15 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Shi Lei --- src/bhyve/bhyve_command.c | 3 --- src/bhyve/bhyve_driver.c | 1 - src/bhyve/bhyve_monitor.c | 1 - src/bhyve/bhyve_process.c | 1 - src/conf/cpu_conf.c | 1 - src/conf/domain_capabilities.c | 1 - src/conf/domain_conf.c | 10 ---------- src/conf/network_conf.c | 2 -- src/cpu/cpu_x86.c | 1 - src/locking/lock_driver_nop.c | 1 - src/network/bridge_driver.c | 1 - src/network/bridge_driver_linux.c | 1 - src/nwfilter/nwfilter_learnipaddr.c | 1 - src/phyp/phyp_driver.c | 1 - src/qemu/qemu_alias.c | 1 - src/qemu/qemu_domain_address.c | 1 - src/qemu/qemu_driver.c | 1 - src/qemu/qemu_monitor.c | 1 - src/qemu/qemu_monitor_json.c | 1 - src/qemu/qemu_process.c | 1 - src/storage/storage_backend_sheepdog.c | 3 --- src/storage/storage_driver.c | 1 - src/storage/storage_util.c | 1 - src/test/test_driver.c | 2 -- src/util/virdnsmasq.c | 1 - src/util/virfile.c | 1 - src/util/virnetdev.c | 3 --- src/util/virnetdevmacvlan.c | 1 - src/util/virstoragefile.c | 1 - src/util/virutil.c | 1 - src/vbox/vbox_storage.c | 1 - src/vz/vz_driver.c | 1 - src/vz/vz_sdk.c | 1 - src/xenapi/xenapi_driver.c | 2 -- src/xenconfig/xen_common.c | 1 - 35 files changed, 53 deletions(-) diff --git a/src/bhyve/bhyve_command.c b/src/bhyve/bhyve_command.c index 802997b..6149c93 100644 --- a/src/bhyve/bhyve_command.c +++ b/src/bhyve/bhyve_command.c @@ -147,7 +147,6 @@ bhyveBuildNetArgStr(virConnectPtr conn, static int bhyveBuildConsoleArgStr(const virDomainDef *def, virCommandPtr cmd) { - virDomainChrDefPtr chr =3D NULL; =20 if (!def->nserials) @@ -710,7 +709,6 @@ virBhyveProcessBuildCustomLoaderCmd(virDomainDefPtr def) static bool virBhyveUsableDisk(virDomainDiskDefPtr disk) { - if (virDomainDiskTranslateSourcePool(disk) < 0) return false; =20 @@ -734,7 +732,6 @@ virBhyveUsableDisk(virDomainDiskDefPtr disk) static void virBhyveFormatGrubDevice(virBufferPtr devicemap, virDomainDiskDefPtr def) { - if (def->device =3D=3D VIR_DOMAIN_DISK_DEVICE_CDROM) virBufferAsprintf(devicemap, "(cd) %s\n", virDomainDiskGetSource(def)); diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c index c9f58e1..4d4f85f 100644 --- a/src/bhyve/bhyve_driver.c +++ b/src/bhyve/bhyve_driver.c @@ -133,7 +133,6 @@ bhyveAutostartDomains(bhyveConnPtr driver) virCapsPtr ATTRIBUTE_NONNULL(1) bhyveDriverGetCapabilities(bhyveConnPtr driver) { - return virObjectRef(driver->caps); } =20 diff --git a/src/bhyve/bhyve_monitor.c b/src/bhyve/bhyve_monitor.c index 8524834..4d5262c 100644 --- a/src/bhyve/bhyve_monitor.c +++ b/src/bhyve/bhyve_monitor.c @@ -177,7 +177,6 @@ bhyveMonitorOpen(virDomainObjPtr vm, bhyveConnPtr drive= r) void bhyveMonitorClose(bhyveMonitorPtr mon) { - if (mon =3D=3D NULL) return; =20 diff --git a/src/bhyve/bhyve_process.c b/src/bhyve/bhyve_process.c index 9276d7d..4dab6e5 100644 --- a/src/bhyve/bhyve_process.c +++ b/src/bhyve/bhyve_process.c @@ -89,7 +89,6 @@ bhyveNetCleanup(virDomainObjPtr vm) static int virBhyveFormatDevMapFile(const char *vm_name, char **fn_out) { - return virAsprintf(fn_out, "%s/grub_bhyve-%s-device.map", BHYVE_STATE_= DIR, vm_name); } diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c index 43a3ab5..863413e 100644 --- a/src/conf/cpu_conf.c +++ b/src/conf/cpu_conf.c @@ -87,7 +87,6 @@ virCPUDefFreeFeatures(virCPUDefPtr def) void ATTRIBUTE_NONNULL(1) virCPUDefFreeModel(virCPUDefPtr def) { - VIR_FREE(def->model); VIR_FREE(def->vendor); VIR_FREE(def->vendor_id); diff --git a/src/conf/domain_capabilities.c b/src/conf/domain_capabilities.c index d3d108a..3b87bdf 100644 --- a/src/conf/domain_capabilities.c +++ b/src/conf/domain_capabilities.c @@ -559,7 +559,6 @@ static void virDomainCapsFeatureSEVFormat(virBufferPtr buf, virSEVCapabilityPtr const sev) { - if (!sev) { virBufferAddLit(buf, "\n"); } else { diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index b08e90e..85cc0de 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -989,7 +989,6 @@ static int virDomainKeyWrapCipherDefParseXML(virDomainKeyWrapDefPtr keywrap, xmlNodePtr node) { - char *name =3D NULL; char *state =3D NULL; int state_type; @@ -6900,7 +6899,6 @@ static int virDomainHostdevSubsysUSBDefParseXML(xmlNodePtr node, virDomainHostdevDefPtr def) { - int ret =3D -1; bool got_product, got_vendor; xmlNodePtr cur; @@ -12138,7 +12136,6 @@ virDomainChrSourceDefParseUnix(virDomainChrSourceDe= fPtr def, xmlNodePtr source, xmlXPathContextPtr ctxt) { - int mode; =20 if ((mode =3D virDomainChrSourceDefParseMode(source)) < 0) @@ -14189,7 +14186,6 @@ virDomainWatchdogDefParseXML(virDomainXMLOptionPtr = xmlopt, xmlNodePtr node, unsigned int flags) { - char *model =3D NULL; char *action =3D NULL; virDomainWatchdogDefPtr def; @@ -16286,7 +16282,6 @@ virDomainChrTargetTypeToString(int deviceType, int virDomainHostdevInsert(virDomainDefPtr def, virDomainHostdevDefPtr hostdev) { - return VIR_APPEND_ELEMENT(def->hostdevs, def->nhostdevs, hostdev); } =20 @@ -16625,7 +16620,6 @@ virDomainDiskByName(virDomainDefPtr def, int virDomainDiskInsert(virDomainDefPtr def, virDomainDiskDefPtr disk) { - if (VIR_REALLOC_N(def->disks, def->ndisks+1) < 0) return -1; =20 @@ -16841,7 +16835,6 @@ virDomainNetRemove(virDomainDefPtr def, size_t i) int virDomainControllerInsert(virDomainDefPtr def, virDomainControllerDefPtr controller) { - if (VIR_REALLOC_N(def->controllers, def->ncontrollers+1) < 0) return -1; =20 @@ -17058,7 +17051,6 @@ void virDomainLeaseInsertPreAlloced(virDomainDefPtr= def, virDomainLeaseDefPtr virDomainLeaseRemoveAt(virDomainDefPtr def, size_t i) { - virDomainLeaseDefPtr lease =3D def->leases[i]; =20 VIR_DELETE_ELEMENT(def->leases, i, def->nleases); @@ -28647,7 +28639,6 @@ virDiskNameToBusDeviceIndex(virDomainDiskDefPtr dis= k, int *busIdx, int *devIdx) { - int idx =3D virDiskNameToIndex(disk->dst); if (idx < 0) return -1; @@ -28678,7 +28669,6 @@ virDiskNameToBusDeviceIndex(virDomainDiskDefPtr dis= k, int virDomainFSInsert(virDomainDefPtr def, virDomainFSDefPtr fs) { - return VIR_APPEND_ELEMENT(def->fss, def->nfss, fs); } =20 diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c index c08456b..5372aff 100644 --- a/src/conf/network_conf.c +++ b/src/conf/network_conf.c @@ -355,8 +355,6 @@ virSocketAddrRangeParseXML(const char *networkName, xmlNodePtr node, virSocketAddrRangePtr range) { - - char *start =3D NULL, *end =3D NULL; int ret =3D -1; =20 diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c index cb27550..4770850 100644 --- a/src/cpu/cpu_x86.c +++ b/src/cpu/cpu_x86.c @@ -463,7 +463,6 @@ static bool x86DataIsSubset(const virCPUx86Data *data, const virCPUx86Data *subset) { - virCPUx86DataIterator iter =3D virCPUx86DataIteratorInit((virCPUx86Dat= a *)subset); const virCPUx86CPUID *cpuid; const virCPUx86CPUID *cpuidSubset; diff --git a/src/locking/lock_driver_nop.c b/src/locking/lock_driver_nop.c index b5eb295..227195f 100644 --- a/src/locking/lock_driver_nop.c +++ b/src/locking/lock_driver_nop.c @@ -63,7 +63,6 @@ static int virLockManagerNopAddResource(virLockManagerPtr= lock ATTRIBUTE_UNUSED, virLockManagerParamPtr params ATTR= IBUTE_UNUSED, unsigned int flags_unused ATTRIBUT= E_UNUSED) { - return 0; } =20 diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index 588b0d1..3e2eac2 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -3237,7 +3237,6 @@ static int networkFindUnusedBridgeName(virNetworkObjListPtr nets, virNetworkDefPtr def) { - int ret =3D -1, id =3D 0; char *newname =3D NULL; const char *templ =3D "virbr%d"; diff --git a/src/network/bridge_driver_linux.c b/src/network/bridge_driver_= linux.c index 3effcdc..fb09954 100644 --- a/src/network/bridge_driver_linux.c +++ b/src/network/bridge_driver_linux.c @@ -486,7 +486,6 @@ static void networkAddGeneralIPv6FirewallRules(virFirewallPtr fw, virNetworkDefPtr def) { - if (!virNetworkDefGetIPByIndex(def, AF_INET6, 0) && !def->ipv6nogw) { return; diff --git a/src/nwfilter/nwfilter_learnipaddr.c b/src/nwfilter/nwfilter_le= arnipaddr.c index 6965af2..008c24b 100644 --- a/src/nwfilter/nwfilter_learnipaddr.c +++ b/src/nwfilter/nwfilter_learnipaddr.c @@ -796,7 +796,6 @@ virNWFilterLearnIPAddress(virNWFilterTechDriverPtr tech= driver ATTRIBUTE_UNUSED, int virNWFilterLearnInit(void) { - if (pendingLearnReq) return 0; =20 diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c index 28a1fa3..faa35a6 100644 --- a/src/phyp/phyp_driver.c +++ b/src/phyp/phyp_driver.c @@ -3652,7 +3652,6 @@ phypDomainSetVcpus(virDomainPtr dom, unsigned int nvc= pus) static int phypDomainHasManagedSaveImage(virDomainPtr dom, unsigned int flags) { - phyp_driverPtr phyp_driver =3D dom->conn->privateData; LIBSSH2_SESSION *session =3D phyp_driver->session; char *managed_system =3D phyp_driver->managed_system; diff --git a/src/qemu/qemu_alias.c b/src/qemu/qemu_alias.c index 162a4d3..815caec 100644 --- a/src/qemu/qemu_alias.c +++ b/src/qemu/qemu_alias.c @@ -301,7 +301,6 @@ qemuAssignDeviceNetAlias(virDomainDefPtr def, virDomainNetDefPtr net, int idx) { - if (net->info.alias) return 0; =20 diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index 8f83ae2..8a8764c 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -915,7 +915,6 @@ qemuDomainFillDevicePCIConnectFlagsIterInit(virDomainDe= fPtr def, virQEMUDriverPtr driver, qemuDomainFillDevicePCIConnect= FlagsIterData *data) { - data->driver =3D driver; =20 if (qemuDomainHasPCIeRoot(def)) { diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 2f8d691..5c8fd55 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -5092,7 +5092,6 @@ qemuDomainPinVcpuFlags(virDomainPtr dom, int maplen, unsigned int flags) { - virQEMUDriverPtr driver =3D dom->conn->privateData; virDomainObjPtr vm; virDomainDefPtr def; diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 4c0002d..7f7013e 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -4121,7 +4121,6 @@ int qemuMonitorGetIOThreads(qemuMonitorPtr mon, qemuMonitorIOThreadInfoPtr **iothreads) { - VIR_DEBUG("iothreads=3D%p", iothreads); =20 QEMU_CHECK_MONITOR(mon); diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 3181805..38c30d1 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -1554,7 +1554,6 @@ int qemuMonitorJSONSetLink(qemuMonitorPtr mon, const char *name, virDomainNetInterfaceLinkState state) { - int ret =3D -1; virJSONValuePtr reply =3D NULL; virJSONValuePtr cmd =3D qemuMonitorJSONMakeCommand("set_link", diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index eb9904b..a06fbf6 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -5492,7 +5492,6 @@ int qemuProcessSetupIOThread(virDomainObjPtr vm, virDomainIOThreadIDDefPtr iothread) { - return qemuProcessSetupPid(vm, iothread->thread_id, VIR_CGROUP_THREAD_IOTHREAD, iothread->iothread_id, diff --git a/src/storage/storage_backend_sheepdog.c b/src/storage/storage_b= ackend_sheepdog.c index 34c118f..419334d 100644 --- a/src/storage/storage_backend_sheepdog.c +++ b/src/storage/storage_backend_sheepdog.c @@ -216,7 +216,6 @@ virStorageBackendSheepdogDeleteVol(virStoragePoolObjPtr= pool, virStorageVolDefPtr vol, unsigned int flags) { - virCheckFlags(0, -1); =20 virCommandPtr cmd =3D virCommandNewArgList(SHEEPDOGCLI, "vdi", "delete= ", vol->name, NULL); @@ -386,7 +385,6 @@ virStorageBackendSheepdogResizeVol(virStoragePoolObjPtr= pool, unsigned long long capacity, unsigned int flags) { - virCheckFlags(0, -1); =20 virCommandPtr cmd =3D virCommandNewArgList(SHEEPDOGCLI, "vdi", "resize= ", vol->name, NULL); @@ -396,7 +394,6 @@ virStorageBackendSheepdogResizeVol(virStoragePoolObjPtr= pool, =20 virCommandFree(cmd); return ret; - } =20 =20 diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c index 8943df1..c7a7155 100644 --- a/src/storage/storage_driver.c +++ b/src/storage/storage_driver.c @@ -2258,7 +2258,6 @@ virStorageBackendPloopRestoreDesc(char *path) static void virStorageVolPoolRefreshThread(void *opaque) { - virStorageVolStreamInfoPtr cbdata =3D opaque; virStoragePoolObjPtr obj =3D NULL; virStoragePoolDefPtr def; diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c index 7d3db6a..e78372a 100644 --- a/src/storage/storage_util.c +++ b/src/storage/storage_util.c @@ -3174,7 +3174,6 @@ virStorageBackendBLKIDFindEmpty(const char *device, const char *format, bool writelabel) { - int ret =3D -1; int rc; blkid_probe probe =3D NULL; diff --git a/src/test/test_driver.c b/src/test/test_driver.c index c1f31b4..8760bab 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -2719,7 +2719,6 @@ static int testConnectListDefinedDomains(virConnectPt= r conn, char **const names, int maxnames) { - testDriverPtr privconn =3D conn->privateData; =20 memset(names, 0, sizeof(*names)*maxnames); @@ -5235,7 +5234,6 @@ testStorageVolDelete(virStorageVolPtr vol, static int testStorageVolumeTypeForPool(int pooltype) { - switch (pooltype) { case VIR_STORAGE_POOL_DIR: case VIR_STORAGE_POOL_FS: diff --git a/src/util/virdnsmasq.c b/src/util/virdnsmasq.c index 492dcad..7872b6e 100644 --- a/src/util/virdnsmasq.c +++ b/src/util/virdnsmasq.c @@ -885,6 +885,5 @@ dnsmasqCapsGetVersion(dnsmasqCapsPtr caps) bool dnsmasqCapsGet(dnsmasqCapsPtr caps, dnsmasqCapsFlags flag) { - return caps && virBitmapIsBitSet(caps->flags, flag); } diff --git a/src/util/virfile.c b/src/util/virfile.c index 2366c11..af45a51 100644 --- a/src/util/virfile.c +++ b/src/util/virfile.c @@ -2819,7 +2819,6 @@ virFileAccessibleAs(const char *path, uid_t uid ATTRIBUTE_UNUSED, gid_t gid ATTRIBUTE_UNUSED) { - VIR_WARN("Ignoring uid/gid due to WIN32"); =20 return access(path, mode); diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c index c30a600..39c9131 100644 --- a/src/util/virnetdev.c +++ b/src/util/virnetdev.c @@ -665,7 +665,6 @@ int virNetDevSetOnline(const char *ifname, bool online) { - return virNetDevSetIFFlag(ifname, VIR_IFF_UP, online); } =20 @@ -1073,7 +1072,6 @@ int virNetDevSysfsFile(char **pf_sysfs_device_link, const char *ifname, const char *file) { - if (virAsprintf(pf_sysfs_device_link, SYSFS_NET_DIR "%s/%s", ifname, f= ile) < 0) return -1; return 0; @@ -1083,7 +1081,6 @@ static int virNetDevSysfsDeviceFile(char **pf_sysfs_device_link, const char *ifname, const char *file) { - if (virAsprintf(pf_sysfs_device_link, SYSFS_NET_DIR "%s/device/%s", if= name, file) < 0) return -1; diff --git a/src/util/virnetdevmacvlan.c b/src/util/virnetdevmacvlan.c index eff3ef9..a6b726f 100644 --- a/src/util/virnetdevmacvlan.c +++ b/src/util/virnetdevmacvlan.c @@ -83,7 +83,6 @@ virBitmapPtr macvlanIDs =3D NULL; static int virNetDevMacVLanOnceInit(void) { - if (!macvtapIDs && !(macvtapIDs =3D virBitmapNew(MACVLAN_MAX_ID + 1))) return -1; diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index 6939d0d..927223e 100644 --- a/src/util/virstoragefile.c +++ b/src/util/virstoragefile.c @@ -4753,7 +4753,6 @@ virStorageFileReportBrokenChain(int errcode, virStorageSourcePtr src, virStorageSourcePtr parent) { - if (src->drv) { unsigned int access_user =3D src->drv->uid; unsigned int access_group =3D src->drv->gid; diff --git a/src/util/virutil.c b/src/util/virutil.c index 2900836..47f5bd0 100644 --- a/src/util/virutil.c +++ b/src/util/virutil.c @@ -1688,7 +1688,6 @@ virGetDeviceID(const char *path ATTRIBUTE_UNUSED, int *maj ATTRIBUTE_UNUSED, int *min ATTRIBUTE_UNUSED) { - return -ENOSYS; } #endif diff --git a/src/vbox/vbox_storage.c b/src/vbox/vbox_storage.c index 672caa6..7047e54 100644 --- a/src/vbox/vbox_storage.c +++ b/src/vbox/vbox_storage.c @@ -44,7 +44,6 @@ static vboxUniformedAPI gVBoxAPI; =20 static int vboxConnectNumOfStoragePools(virConnectPtr conn ATTRIBUTE_UNUSE= D) { - /** Currently only one pool supported, the default one * given by ISystemProperties::defaultHardDiskFolder() */ diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c index c9520d4..7a79ec2 100644 --- a/src/vz/vz_driver.c +++ b/src/vz/vz_driver.c @@ -183,7 +183,6 @@ vzGetDriverConnection(void) void vzDestroyDriverConnection(void) { - vzDriverPtr driver; vzConnPtr privconn_list; =20 diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c index c6443d9..5ca906e 100644 --- a/src/vz/vz_sdk.c +++ b/src/vz/vz_sdk.c @@ -4126,7 +4126,6 @@ prlsdkCreateVm(vzDriverPtr driver, virDomainDefPtr de= f) static int virStorageTranslatePoolLocal(virConnectPtr conn, virStorageSourcePtr src) { - virStoragePoolPtr pool =3D NULL; virStorageVolPtr vol =3D NULL; virStorageVolInfo info; diff --git a/src/xenapi/xenapi_driver.c b/src/xenapi/xenapi_driver.c index 96cad99..f7519cb 100644 --- a/src/xenapi/xenapi_driver.c +++ b/src/xenapi/xenapi_driver.c @@ -447,7 +447,6 @@ xenapiNodeGetInfo(virConnectPtr conn, virNodeInfoPtr in= fo) static char * xenapiConnectGetCapabilities(virConnectPtr conn) { - virCapsPtr caps =3D ((struct _xenapiPrivate *)(conn->privateData))->ca= ps; if (caps) return virCapabilitiesFormatXML(caps); @@ -1241,7 +1240,6 @@ xenapiDomainGetVcpus(virDomainPtr dom, virVcpuInfoPtr info, int maxinfo, unsigned char *cpumaps, int maplen) { - xen_vm_set *vms =3D NULL; xen_vm vm =3D NULL; xen_string_string_map *vcpu_params =3D NULL; diff --git a/src/xenconfig/xen_common.c b/src/xenconfig/xen_common.c index be9e232..36a9d27 100644 --- a/src/xenconfig/xen_common.c +++ b/src/xenconfig/xen_common.c @@ -1346,7 +1346,6 @@ xenFormatNet(virConnectPtr conn, static int xenFormatPCI(virConfPtr conf, virDomainDefPtr def) { - virConfValuePtr pciVal =3D NULL; int hasPCI =3D 0; size_t i; --=20 2.17.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Tue May 7 04:07:52 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.zohomail.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 1536828998999531.7896499441348; Thu, 13 Sep 2018 01:56:38 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3C64E3082A22; Thu, 13 Sep 2018 08:56:37 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0AA57309132E; Thu, 13 Sep 2018 08:56:37 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id B12154BB75; Thu, 13 Sep 2018 08:56:36 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w8D8taDm002797 for ; Thu, 13 Sep 2018 04:55:36 -0400 Received: by smtp.corp.redhat.com (Postfix) id A50CD2010CBA; Thu, 13 Sep 2018 08:55:36 +0000 (UTC) Received: from mx1.redhat.com (ext-mx20.extmail.prod.ext.phx2.redhat.com [10.5.110.49]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9C93E2010CAB for ; Thu, 13 Sep 2018 08:55:34 +0000 (UTC) Received: from m97134.mail.qiye.163.com (m97134.mail.qiye.163.com [220.181.97.134]) by mx1.redhat.com (Postfix) with ESMTP id 1E63E30900E6 for ; Thu, 13 Sep 2018 08:55:32 +0000 (UTC) Received: from localhost.localdomain (unknown [58.56.27.130]) by smtp5 (Coremail) with SMTP id huCowACHxWL+JZpbTfvyAQ--.224S7; Thu, 13 Sep 2018 16:55:30 +0800 (CST) From: Shi Lei To: libvir-list@redhat.com Date: Thu, 13 Sep 2018 16:55:23 +0800 Message-Id: <20180913085524.3520-6-shi_lei@massclouds.com> In-Reply-To: <20180913085524.3520-1-shi_lei@massclouds.com> References: <20180913085524.3520-1-shi_lei@massclouds.com> X-CM-TRANSID: huCowACHxWL+JZpbTfvyAQ--.224S7 X-Coremail-Antispam: 1Uf129KBjDUn29KB7ZKAUJUUUU8529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvjTRGnmRUUUUU X-Originating-IP: [58.56.27.130] X-CM-SenderInfo: pvklsz1hl6ztxvvfz0xxgvhudrp/1tbifAPAT1rpNi6JowAAsx X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 212 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Thu, 13 Sep 2018 08:55:33 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Thu, 13 Sep 2018 08:55:33 +0000 (UTC) for IP:'220.181.97.134' DOMAIN:'m97134.mail.qiye.163.com' HELO:'m97134.mail.qiye.163.com' FROM:'shi_lei@massclouds.com' RCPT:'' X-RedHat-Spam-Score: -0.01 (RCVD_IN_DNSWL_NONE) 220.181.97.134 m97134.mail.qiye.163.com 220.181.97.134 m97134.mail.qiye.163.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.49 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.25 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCHv2 5/6] tests: remove blank first line in function body 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.84 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Thu, 13 Sep 2018 08:56:37 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Shi Lei --- tests/virnetdevmock.c | 1 - tests/vshtabletest.c | 3 --- 2 files changed, 4 deletions(-) diff --git a/tests/virnetdevmock.c b/tests/virnetdevmock.c index a9967b7..3eb5059 100644 --- a/tests/virnetdevmock.c +++ b/tests/virnetdevmock.c @@ -34,7 +34,6 @@ virNetDevSysfsFile(char **pf_sysfs_device_link, const char *ifname, const char *file) { - if (virAsprintfQuiet(pf_sysfs_device_link, "%s/%s/%s", NET_DEV_TEST_DATA_PREFIX, ifname, file) < 0) { fprintf(stderr, "Out of memory\n"); diff --git a/tests/vshtabletest.c b/tests/vshtabletest.c index 1138e34..ce415e8 100644 --- a/tests/vshtabletest.c +++ b/tests/vshtabletest.c @@ -116,7 +116,6 @@ testVshTableRowAppend(const void *opaque ATTRIBUTE_UNUS= ED) static int testUnicode(const void *opaque ATTRIBUTE_UNUSED) { - int ret =3D 0; char *act =3D NULL; =20 @@ -149,7 +148,6 @@ testUnicode(const void *opaque ATTRIBUTE_UNUSED) static int testUnicodeArabic(const void *opaque ATTRIBUTE_UNUSED) { - int ret =3D 0; char *act =3D NULL; =20 @@ -193,7 +191,6 @@ testUnicodeArabic(const void *opaque ATTRIBUTE_UNUSED) static int testUnicodeZeroWidthChar(const void *opaque ATTRIBUTE_UNUSED) { - int ret =3D 0; vshTablePtr table =3D NULL; const char *exp =3D --=20 2.17.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Tue May 7 04:07:52 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.zohomail.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 1536828943999254.7815361914403; Thu, 13 Sep 2018 01:55:43 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DE4DBBCD57; Thu, 13 Sep 2018 08:55:41 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A847030912F4; Thu, 13 Sep 2018 08:55:41 +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 2BD084A460; Thu, 13 Sep 2018 08:55:41 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w8D8tb7O002805 for ; Thu, 13 Sep 2018 04:55:37 -0400 Received: by smtp.corp.redhat.com (Postfix) id F21A919940; Thu, 13 Sep 2018 08:55:36 +0000 (UTC) Received: from mx1.redhat.com (ext-mx01.extmail.prod.ext.phx2.redhat.com [10.5.110.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E9F1E19936 for ; Thu, 13 Sep 2018 08:55:34 +0000 (UTC) Received: from m97134.mail.qiye.163.com (m97134.mail.qiye.163.com [220.181.97.134]) by mx1.redhat.com (Postfix) with ESMTP id A113C7F3F4 for ; Thu, 13 Sep 2018 08:55:32 +0000 (UTC) Received: from localhost.localdomain (unknown [58.56.27.130]) by smtp5 (Coremail) with SMTP id huCowACHxWL+JZpbTfvyAQ--.224S8; Thu, 13 Sep 2018 16:55:31 +0800 (CST) From: Shi Lei To: libvir-list@redhat.com Date: Thu, 13 Sep 2018 16:55:24 +0800 Message-Id: <20180913085524.3520-7-shi_lei@massclouds.com> In-Reply-To: <20180913085524.3520-1-shi_lei@massclouds.com> References: <20180913085524.3520-1-shi_lei@massclouds.com> X-CM-TRANSID: huCowACHxWL+JZpbTfvyAQ--.224S8 X-Coremail-Antispam: 1Uf129KBjDUn29KB7ZKAUJUUUU8529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvjTRGnmRUUUUU X-Originating-IP: [58.56.27.130] X-CM-SenderInfo: pvklsz1hl6ztxvvfz0xxgvhudrp/1tbiggPAT1sfl7pdQAAAs6 X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 212 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 13 Sep 2018 08:55:33 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 13 Sep 2018 08:55:33 +0000 (UTC) for IP:'220.181.97.134' DOMAIN:'m97134.mail.qiye.163.com' HELO:'m97134.mail.qiye.163.com' FROM:'shi_lei@massclouds.com' RCPT:'' X-RedHat-Spam-Score: -0.01 (RCVD_IN_DNSWL_NONE) 220.181.97.134 m97134.mail.qiye.163.com 220.181.97.134 m97134.mail.qiye.163.com X-Scanned-By: MIMEDefang 2.83 on 10.5.110.25 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCHv2 6/6] tools: remove blank first line in function body 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.84 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 13 Sep 2018 08:55:42 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Shi Lei --- tools/virsh-volume.c | 1 - tools/virt-admin.c | 1 - 2 files changed, 2 deletions(-) diff --git a/tools/virsh-volume.c b/tools/virsh-volume.c index 9d6ebd2..42d1170 100644 --- a/tools/virsh-volume.c +++ b/tools/virsh-volume.c @@ -520,7 +520,6 @@ cmdVolCreateFrom(vshControl *ctl, const vshCmd *cmd) static xmlChar * virshMakeCloneXML(const char *origxml, const char *newname) { - xmlDocPtr doc =3D NULL; xmlXPathContextPtr ctxt =3D NULL; xmlXPathObjectPtr obj =3D NULL; diff --git a/tools/virt-admin.c b/tools/virt-admin.c index 107a1d8..63822bc 100644 --- a/tools/virt-admin.c +++ b/tools/virt-admin.c @@ -82,7 +82,6 @@ vshAdmClientTransportToString(int transport) static int vshAdmGetTimeStr(vshControl *ctl, time_t then, char **result) { - char *tmp =3D NULL; struct tm timeinfo; =20 --=20 2.17.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list