From nobody Sun Feb 8 21:29:35 2026 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; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1571438270; cv=none; d=zoho.com; s=zohoarc; b=BnA11iDECS0ERQrQmt3b6TXsVV//KrKQ4v9er1Bj+DH0iIdV/Foi3rsjl1ysZFpvCqgY+Gx5Nppwia7sYdpqeWZ/k1EkiAKcTk9+dWQ4Zmee7xJptLFaZuYWa3ncAeNhQdjD/27x3CUjCcRCUYD6cZkBpVqGYK2OEU5YLICGxfg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571438270; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=lDSXwtbyiC5TAJALTQ8MG1VavNaTEBQaTRBDsLZypxM=; b=HXu8xS4d+P7MceulCG+1Q4MgzUYqvDCGhtFibr6mSbyTp/blqy3RaZmPt6WGyCF3Jg/1ceZf/Zk5cRLqGyjPz5NO+IRZXhq7YjD2Pq25JouGrDLlJRoubHGQgv36tt18dgihsFKUcdTyX0p6ZBoOM2Zs3fvRANAgJT+gMxZBA6s= ARC-Authentication-Results: i=1; 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; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1571438270399633.934831180356; Fri, 18 Oct 2019 15:37:50 -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 7C07751EFD; Fri, 18 Oct 2019 22:37:48 +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 52F865D70E; Fri, 18 Oct 2019 22:37:48 +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 16F774EE6F; Fri, 18 Oct 2019 22:37:48 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x9IMbDDE025282 for ; Fri, 18 Oct 2019 18:37:13 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6C8475D713; Fri, 18 Oct 2019 22:37:13 +0000 (UTC) Received: from lpt.redhat.com (ovpn-200-21.brq.redhat.com [10.40.200.21]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8483E5D70E for ; Fri, 18 Oct 2019 22:37:12 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Sat, 19 Oct 2019 00:37:48 +0200 Message-Id: <01cfe9d9e8675107dcff86babeae82b6e30b46a2.1571438247.git.jtomko@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 04/10] virsh: getSignalNumber: rename variables 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: , Content-Type: text/plain; charset="utf-8" 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]); Fri, 18 Oct 2019 22:37:49 +0000 (UTC) Use 'str' for the allocated copy of the string and 'p' for the pointer into that string. Signed-off-by: J=C3=A1n Tomko --- tools/virsh-domain.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 715ad51ef5..d74a671167 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -8806,26 +8806,26 @@ static int getSignalNumber(vshControl *ctl, const c= har *signame) { size_t i; int signum; - char *lower =3D vshStrdup(ctl, signame); - char *tmp =3D lower; + char *str =3D vshStrdup(ctl, signame); + char *p =3D str; =20 for (i =3D 0; signame[i]; i++) - lower[i] =3D c_tolower(signame[i]); + p[i] =3D c_tolower(signame[i]); =20 - if (virStrToLong_i(lower, NULL, 10, &signum) >=3D 0) + if (virStrToLong_i(p, NULL, 10, &signum) >=3D 0) goto cleanup; =20 - if (STRPREFIX(lower, "sig_")) - lower +=3D 4; - else if (STRPREFIX(lower, "sig")) - lower +=3D 3; + if (STRPREFIX(p, "sig_")) + p +=3D 4; + else if (STRPREFIX(p, "sig")) + p +=3D 3; =20 - if ((signum =3D virDomainProcessSignalTypeFromString(lower)) >=3D 0) + if ((signum =3D virDomainProcessSignalTypeFromString(p)) >=3D 0) goto cleanup; =20 signum =3D -1; cleanup: - VIR_FREE(tmp); + VIR_FREE(str); return signum; } =20 --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list