From nobody Sun Feb 8 15:01:49 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=1571438338; cv=none; d=zoho.com; s=zohoarc; b=AtAuFA8o03TGqoNVqR4bLeSbRH8v0+ff1uKS7hcSwpWh3n+BxSd18bNShKxuO3F98Mnv/VviF8p/CjBH3ErQoUOGtK4Q0isV4SS0ZBmtfSRVsqpm2Bsv3M3+Xax6VDSP6jr7VTk+QYx7yRw7ljR0OyrMUNsgtAdmofecODQDPTw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571438338; 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=9MflZbj9xyHgotXiWYT4RTwjfFqcQ3yn3cxP0aD2eQY=; b=BLzySUMir7RPpEpEr7b6TO3Fpyi8LqWGq1dYdGzmPISqE5cxd9m8X9Rar6VfUDQPcZxadJ7reAmBlu5oBniNwamkCcFFN1go78+IoFJ8aDyYj8UFooYx16o9V6w6NhFTbkvBLI7O203u1Tbod2APFEYgvDcEInbBkpTkciBkLzk= 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 1571438338785538.0221944926149; Fri, 18 Oct 2019 15:38:58 -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 4836A3018FC5; Fri, 18 Oct 2019 22:38:57 +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 1F4B460F88; Fri, 18 Oct 2019 22:38:57 +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 D51013FB4D; Fri, 18 Oct 2019 22:38:56 +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 x9IMbQSt025376 for ; Fri, 18 Oct 2019 18:37:26 -0400 Received: by smtp.corp.redhat.com (Postfix) id B69FD5D70E; Fri, 18 Oct 2019 22:37:26 +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 D40A85D71C for ; Fri, 18 Oct 2019 22:37:21 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Sat, 19 Oct 2019 00:37:54 +0200 Message-Id: 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 10/10] tools: delete vshStrdup 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.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Fri, 18 Oct 2019 22:38:57 +0000 (UTC) Now that we use g_strdup everywhere, delete vshStrdup. Signed-off-by: J=C3=A1n Tomko --- tools/vsh.c | 12 ------------ tools/vsh.h | 4 ---- 2 files changed, 16 deletions(-) diff --git a/tools/vsh.c b/tools/vsh.c index baba5ec314..a10a9625e4 100644 --- a/tools/vsh.c +++ b/tools/vsh.c @@ -142,18 +142,6 @@ _vshCalloc(vshControl *ctl, size_t nmemb, size_t size,= const char *filename, exit(EXIT_FAILURE); } =20 -char * -_vshStrdup(vshControl *ctl, const char *s, const char *filename, int line) -{ - char *x; - - if (VIR_STRDUP(x, s) >=3D 0) - return x; - vshError(ctl, _("%s: %d: failed to allocate %lu bytes"), - filename, line, (unsigned long)strlen(s)); - exit(EXIT_FAILURE); -} - int vshNameSorter(const void *a, const void *b) { diff --git a/tools/vsh.h b/tools/vsh.h index 99977af7e3..ad783e24b7 100644 --- a/tools/vsh.h +++ b/tools/vsh.h @@ -473,10 +473,6 @@ void *_vshCalloc(vshControl *ctl, size_t nmemb, size_t= sz, #define vshCalloc(_ctl, _nmemb, _sz) \ _vshCalloc(_ctl, _nmemb, _sz, __FILE__, __LINE__) =20 -char *_vshStrdup(vshControl *ctl, const char *s, const char *filename, - int line); -#define vshStrdup(_ctl, _s) _vshStrdup(_ctl, _s, __FILE__, __LINE__) - /* Macros to help dealing with mutually exclusive options. */ =20 /* VSH_EXCLUSIVE_OPTIONS_EXPR: --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list