From nobody Sun Feb 8 21:29:16 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=1571438312; cv=none; d=zoho.com; s=zohoarc; b=B45pawazqhYaf0N84CEgKdKyUKqE4ZlHzUXBA5v3/L7Yc02Ertr+2U/sfoeyO1caCohNKAW/EpCSqvTZDC1Re6BVm+N3VqiD1YGWxnufZsOweMGF4KiJtDEZj+YoFtY07eWR2sE/8CU6upAixa/0iVDytb5pUjg3KwrG5oXsBFs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571438312; 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=66aBbEe016ynA5XWp4yyBQ3lZhd5FL+AOLyK7c2A2VA=; b=FG/pJ88TSSShizQdQEsgF59vtF6Z5EL/aKj0MfbLH5jkK/wmj7oXTBw92sOvrluXsg/LCxKcN6h9EzVW+CRcC4Ob1XoWSt6fYEifJbSOAloPyicKYeMSrC0+OSV+kX6q9AE2zTKIaAjvq3HPbxHQX61dyir2h5nXemC7MaXaHIU= 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 1571438312253930.4069857647655; Fri, 18 Oct 2019 15:38:32 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A16AE51F00; Fri, 18 Oct 2019 22:38:30 +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 77A58100EBD6; Fri, 18 Oct 2019 22:38:30 +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 292F53FC61; Fri, 18 Oct 2019 22:38:30 +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 x9IMbGPm025304 for ; Fri, 18 Oct 2019 18:37:16 -0400 Received: by smtp.corp.redhat.com (Postfix) id 32DA95D71C; Fri, 18 Oct 2019 22:37:16 +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 7C4025D70E for ; Fri, 18 Oct 2019 22:37:15 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Sat, 19 Oct 2019 00:37:50 +0200 Message-Id: <6cb1f912751b773500e3534979b8391376fedced.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 06/10] virsh: getSignalNumber: use g_strdup 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.84 on 10.5.11.22 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:38:31 +0000 (UTC) Eliminate the use of vshStrdup. Signed-off-by: J=C3=A1n Tomko --- tools/virsh-domain.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 44eb8a5d32..b1618960b1 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -8802,11 +8802,11 @@ VIR_ENUM_IMPL(virDomainProcessSignal, "rt23", "rt24", "rt25", "rt26", "rt27", /* 55-59 */ "rt28", "rt29", "rt30", "rt31", "rt32"); /* 60-64 */ =20 -static int getSignalNumber(vshControl *ctl, const char *signame) +static int getSignalNumber(const char *signame) { size_t i; int signum; - g_autofree char *str =3D vshStrdup(ctl, signame); + g_autofree char *str =3D g_strdup(signame); char *p =3D str; =20 for (i =3D 0; signame[i]; i++) @@ -8840,7 +8840,7 @@ cmdSendProcessSignal(vshControl *ctl, const vshCmd *c= md) if (vshCommandOptStringReq(ctl, cmd, "signame", &signame) < 0) return false; =20 - if ((signum =3D getSignalNumber(ctl, signame)) < 0) { + if ((signum =3D getSignalNumber(signame)) < 0) { vshError(ctl, _("malformed signal name: %s"), signame); return false; } --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list