From nobody Mon Apr 29 02:53:40 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 1501671182981173.78956731260064; Wed, 2 Aug 2017 03:53:02 -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 740AB81229; Wed, 2 Aug 2017 10:53:00 +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 E14D67813E; Wed, 2 Aug 2017 10:52:59 +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 B588B180B467; Wed, 2 Aug 2017 10:52:58 +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 v72Aq3LV012382 for ; Wed, 2 Aug 2017 06:52:03 -0400 Received: by smtp.corp.redhat.com (Postfix) id AF6557EFF2; Wed, 2 Aug 2017 10:52:03 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.42.22.189]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1CC8E7B59F; Wed, 2 Aug 2017 10:52:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 740AB81229 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=fail smtp.mailfrom=libvir-list-bounces@redhat.com From: "Daniel P. Berrange" To: libvir-list@redhat.com Date: Wed, 2 Aug 2017 11:51:58 +0100 Message-Id: <20170802105158.26318-1-berrange@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] tools: rename 'socket' to 'sockpath' 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.25]); Wed, 02 Aug 2017 10:53:01 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" A variable named 'socket' clashes with the function of the same name, causing build failures due to warnings on some platforms. Signed-off-by: Daniel P. Berrange --- Pushed as CI build fix tools/virsh-domain.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 935ef8acd..512804ccc 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -10949,7 +10949,7 @@ cmdDomDisplay(vshControl *ctl, const vshCmd *cmd) char *listen_addr =3D NULL; int port, tls_port =3D 0; char *type_conn =3D NULL; - char *socket =3D NULL; + char *sockpath =3D NULL; char *passwd =3D NULL; char *output =3D NULL; const char *scheme[] =3D { "vnc", "spice", "rdp", NULL }; @@ -11030,17 +11030,17 @@ cmdDomDisplay(vshControl *ctl, const vshCmd *cmd) VIR_FREE(xpath); =20 if (STREQ_NULLABLE(type_conn, "socket")) { - if (!socket) { + if (!sockpath) { if (virAsprintf(&xpath, xpath_fmt, scheme[iter], "listen/@= socket") < 0) goto cleanup; =20 - socket =3D virXPathString(xpath, ctxt); + sockpath =3D virXPathString(xpath, ctxt); =20 VIR_FREE(xpath); } } =20 - if (!port && !tls_port && !socket) + if (!port && !tls_port && !sockpath) continue; =20 if (!listen_addr) { @@ -11098,7 +11098,7 @@ cmdDomDisplay(vshControl *ctl, const vshCmd *cmd) VIR_FREE(xpath); =20 /* Build up the full URI, starting with the scheme */ - if (socket) + if (sockpath) virBufferAsprintf(&buf, "%s+unix://", scheme[iter]); else virBufferAsprintf(&buf, "%s://", scheme[iter]); @@ -11108,17 +11108,17 @@ cmdDomDisplay(vshControl *ctl, const vshCmd *cmd) virBufferAsprintf(&buf, ":%s@", passwd); =20 /* Then host name or IP */ - if (!listen_addr && !socket) + if (!listen_addr && !sockpath) virBufferAddLit(&buf, "localhost"); - else if (!socket && strchr(listen_addr, ':')) + else if (!sockpath && strchr(listen_addr, ':')) virBufferAsprintf(&buf, "[%s]", listen_addr); - else if (socket) - virBufferAsprintf(&buf, "%s", socket); + else if (sockpath) + virBufferAsprintf(&buf, "%s", sockpath); else virBufferAsprintf(&buf, "%s", listen_addr); =20 /* Free socket to prepare the pointer for the next iteration */ - VIR_FREE(socket); + VIR_FREE(sockpath); =20 /* Add the port */ if (port) { @@ -11177,7 +11177,7 @@ cmdDomDisplay(vshControl *ctl, const vshCmd *cmd) cleanup: VIR_FREE(xpath); VIR_FREE(type_conn); - VIR_FREE(socket); + VIR_FREE(sockpath); VIR_FREE(passwd); VIR_FREE(listen_addr); VIR_FREE(output); --=20 2.13.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list