From nobody Mon Feb 9 16:01:57 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.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 63.128.21.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=1612600476; cv=none; d=zohomail.com; s=zohoarc; b=SYW2iaOmza3JhOe0TB1b4i0ACketBbqq8GVQlYTZcZ/k9/FRjmRZKrP3HVKFgxQqDiLTQDKeM8UUbzlqk4Ql37Z01Vbxf+IldV95a7J3UdQcFtMRjH4BLnNiHnOa2ccy0nRGuMGijFuaf4lusuk7Q2Mr30UrQNq+MA165B1DUZo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612600476; 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=XvyYx5/C/slIitfus4NsclJujmTmf9NzojwnXvdCLZU=; b=CZXK2PjFdNK+qnWChNBHBwtdI6x8CGTxnKxWC8epfgQJu7C99hCdBoqwDfeZ8YvKpatDz2SlkoC73nWm+OKnyFk1+YXmLPPmmS1VniVpJOiuy+nQ4ODNcF6oJ89IAbhG4RexvnrkD1gz4xaRLYDZbFg7TTRDNh/tZY6X/tG6OiY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.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 [63.128.21.124]) by mx.zohomail.com with SMTPS id 1612600476760173.88343852503158; Sat, 6 Feb 2021 00:34:36 -0800 (PST) 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-328-qHZA1OGXO4uLyE3xNA2ejg-1; Sat, 06 Feb 2021 03:34:33 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A831D803F48; Sat, 6 Feb 2021 08:34:28 +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 865DB722F9; Sat, 6 Feb 2021 08:34:28 +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 5427118089D4; Sat, 6 Feb 2021 08:34:28 +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 1168YReL005356 for ; Sat, 6 Feb 2021 03:34:27 -0500 Received: by smtp.corp.redhat.com (Postfix) id 2FD5160C7B; Sat, 6 Feb 2021 08:34:27 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6AD2060C79 for ; Sat, 6 Feb 2021 08:34:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612600475; 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=XvyYx5/C/slIitfus4NsclJujmTmf9NzojwnXvdCLZU=; b=B1m/WwOJFr9zhQEQ6cQbF9SpjYMBwUWNREEDqZDaM2Hi6ZoMD2ELvdaiBWmZvvZs7L/wpG 8kOEHyATVcJ9mc5obV4TM9vxZQ4NKcGX9ugGwWK8OI43DoKqbUeooV7T89eEyaM83Xyh96 6n/mzKNBTsbDV20nHd5snE0RhVlXz1Q= X-MC-Unique: qHZA1OGXO4uLyE3xNA2ejg-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 27/40] util: virstring: Remove virStringListHasString Date: Sat, 6 Feb 2021 09:32:49 +0100 Message-Id: <87ae4086f58fc5ccd557855b69609bceb73b121d.1612599659.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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.11 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" All callers were converted to the glib alternative. Providing our own just to have NULL tolerance doesn't make sense. Signed-off-by: Peter Krempa --- src/libvirt_private.syms | 1 - src/util/virstring.c | 17 ----------------- src/util/virstring.h | 3 --- 3 files changed, 21 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index d215665ee0..ab8cf62552 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -3241,7 +3241,6 @@ virStringHasSuffix; virStringIsEmpty; virStringIsPrintable; virStringListFreeCount; -virStringListHasString; virStringListJoin; virStringListLength; virStringListMerge; diff --git a/src/util/virstring.c b/src/util/virstring.c index 516b898223..c0393585e2 100644 --- a/src/util/virstring.c +++ b/src/util/virstring.c @@ -221,23 +221,6 @@ virStringListFreeCount(char **strings, } -bool -virStringListHasString(const char **strings, - const char *needle) -{ - size_t i =3D 0; - - if (!strings) - return false; - - while (strings[i]) { - if (STREQ(strings[i++], needle)) - return true; - } - - return false; -} - /* Like strtol, but produce an "int" result, and check more carefully. Return 0 upon success; return -1 to indicate failure. When END_PTR is NULL, the byte after the final valid digit must be NUL. diff --git a/src/util/virstring.h b/src/util/virstring.h index 4705b9c141..1a15812307 100644 --- a/src/util/virstring.h +++ b/src/util/virstring.h @@ -43,9 +43,6 @@ int virStringListMerge(char ***dst, void virStringListFreeCount(char **strings, size_t count); -bool virStringListHasString(const char **strings, - const char *needle); - int virStrToLong_i(char const *s, char **end_ptr, int base, --=20 2.29.2