From nobody Mon Feb 9 09:01:31 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 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=1617285411; cv=none; d=zohomail.com; s=zohoarc; b=YAnQ15VlEVaI1Y0BeDXQOe4JjQOd+DkgMT8pMd9dD70rpJrLOmshyY4Bk13SQ2Z9ZnWejrj3JmMIp/4JzhYUySCaDbV582un1GgAEHAA3rx44CZ4oz+6s+9js5rLB0AcidRbxEtirkZeh/zrYBsD6/aGdH0g2cXkEYcp7r+w4ik= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1617285411; 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=mynK+FEfGow++fE3hRCtchp602elUsMA1vstFfr8gmY=; b=GVNP9FI/ZqgsigwD3cwJjYBhhGzbuw0S7RDinI0WDg9jOhIFslWc9pA8eg41NJwi1wRcz612OBKbOekYA+7mHzoP+OVGkwILFam6Kr7zXM3zOOvuC/2GJCFohA3RnH/RmXxLRB4RfVF0HmM3EQHjmHNeYw+A0bLKzcA1vd1zF1M= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1617285411354146.51624720490247; Thu, 1 Apr 2021 06:56:51 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-154-FZQEWtaLMMqIj5ZplnvXKg-1; Thu, 01 Apr 2021 09:55:31 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CDEDD19251A2; Thu, 1 Apr 2021 13:55:26 +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 A7AD51B49D; Thu, 1 Apr 2021 13:55:26 +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 6707C4A70A; Thu, 1 Apr 2021 13:55:26 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 131DsOov023696 for ; Thu, 1 Apr 2021 09:54:24 -0400 Received: by smtp.corp.redhat.com (Postfix) id B59625C1A1; Thu, 1 Apr 2021 13:54:24 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 215905C238 for ; Thu, 1 Apr 2021 13:54:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1617285410; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=mynK+FEfGow++fE3hRCtchp602elUsMA1vstFfr8gmY=; b=eg9wR7Z2889mexI1TWKiD1sVaQYTmouBUD2xBviTm/N5d98eU2kmQi1tFxJbVhl5c3mxYp c6FPB7tPnv6/0702Vz15fYmjEa0ABk9HTIdEivSfYQMO+UybS6qH+A9hMCE+UuRUaIOVmW aJ0WGsxD7PCq3av3SLdR49mybsSWQjI= X-MC-Unique: FZQEWtaLMMqIj5ZplnvXKg-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 38/39] util: virstring: Remove the virStringSplitCount wrapper funcion Date: Thu, 1 Apr 2021 15:52:37 +0200 Message-Id: <76d9c2d4b2943ae4feb7c37677f5c59231831d63.1617285119.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Callers which need the count of elements now count it in place. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/libvirt_private.syms | 1 - src/util/virstring.c | 20 -------------------- src/util/virstring.h | 6 ------ 3 files changed, 27 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 9208db2056..68cdb92453 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -3260,7 +3260,6 @@ virStringReplace; virStringSearch; virStringSortCompare; virStringSortRevCompare; -virStringSplitCount; virStringStripControlChars; virStringStripIPv6Brackets; virStringStripSuffix; diff --git a/src/util/virstring.c b/src/util/virstring.c index 7749eb2db5..a2c07e5c17 100644 --- a/src/util/virstring.c +++ b/src/util/virstring.c @@ -35,26 +35,6 @@ VIR_LOG_INIT("util.string"); -/** - * virStringSplitCount: - * - * A wrapper for g_strsplit which provides number of elements of the split - * string. - */ -char ** -virStringSplitCount(const char *string, - const char *delim, - size_t max_tokens, - size_t *tokcount) -{ - GStrv ret =3D g_strsplit(string, delim, max_tokens); - - *tokcount =3D g_strv_length(ret); - - return ret; -} - - /** * virStringListMerge: * @dst: a NULL-terminated array of strings to expand diff --git a/src/util/virstring.h b/src/util/virstring.h index e688495574..7cc1d8c55f 100644 --- a/src/util/virstring.h +++ b/src/util/virstring.h @@ -22,12 +22,6 @@ #define VIR_INT64_STR_BUFLEN 21 -char **virStringSplitCount(const char *string, - const char *delim, - size_t max_tokens, - size_t *tokcount) - ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(4); - int virStringListMerge(char ***dst, char ***src); --=20 2.29.2