From nobody Tue Feb 10 07:39:02 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=1612600460; cv=none; d=zohomail.com; s=zohoarc; b=kprkKSzpq6vvqBhh/Ct4GsqSUEjjsiH6gTuFnWHMSs8H7N7tPzBlZo+msdeM6EA2qqH1UrHVdtXvgmMT1tYauZ0j8Jnmicxuy5i7f2FY8nMeG6rIU9bzwPTZBEmo5jHY35AOfTJlhe3oDR11R1okWy6pnxGSNdMNyHYPwLa4lvA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612600460; 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=ZTjy5DQLY3mrNXBs9SK1Lk/MpJMg8yRZzp3JMLwHBMo=; b=luIN90P9hU5SRfnaGUc4hzEArQrsPK3x4AldVgbgAcWQm4Bu4xVedqkggj8v+ul0n1cWkbjcoPKpA0PMyqWiAgXyT+b0WaSbGb9w5hABWbKCcj4u10eq2sdqLMJIbPaQ8RvSoItB9R6B9i7O+weuS+CWUG6Oxt4bEQQ5jp1rbro= 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 1612600460693212.9650101877471; Sat, 6 Feb 2021 00:34:20 -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-408-LaqX1FJ_ORWd1u6uqPsMvw-1; Sat, 06 Feb 2021 03:34:17 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id E97EA100CCC2; Sat, 6 Feb 2021 08:34:10 +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 C59F460C76; Sat, 6 Feb 2021 08:34:10 +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 868731809C8F; Sat, 6 Feb 2021 08:34:10 +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 1168Y9nY005213 for ; Sat, 6 Feb 2021 03:34:09 -0500 Received: by smtp.corp.redhat.com (Postfix) id 2438060C77; Sat, 6 Feb 2021 08:34:09 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2556360C76 for ; Sat, 6 Feb 2021 08:34:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612600459; 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=ZTjy5DQLY3mrNXBs9SK1Lk/MpJMg8yRZzp3JMLwHBMo=; b=Jms4EKPKLipjPtDJr/VFIvnlaGOYmvw0zqv1aokEDy8yIHauefdGy/7mtjIx6L+/qCDeA5 5aO0ydpC4t6hdD421ivrsecDJyXN2Uhp6XFLxN9iuTrw2uCLGg//tY/VVNeoQ0RxADb3xc a7T1nulHS+qM20eBQb0w1/KXfrkbZ5s= X-MC-Unique: LaqX1FJ_ORWd1u6uqPsMvw-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 23/40] virStringListGetFirstWithPrefix: Remove unused helper Date: Sat, 6 Feb 2021 09:32:45 +0100 Message-Id: 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.12 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" This is a uncommon and trivial operation, so having an utility function for it is pointless. Signed-off-by: Peter Krempa --- src/libvirt_private.syms | 1 - src/util/virstring.c | 18 ------------------ src/util/virstring.h | 3 --- 3 files changed, 22 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 86380d0853..d215665ee0 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -3241,7 +3241,6 @@ virStringHasSuffix; virStringIsEmpty; virStringIsPrintable; virStringListFreeCount; -virStringListGetFirstWithPrefix; virStringListHasString; virStringListJoin; virStringListLength; diff --git a/src/util/virstring.c b/src/util/virstring.c index bf861d4847..516b898223 100644 --- a/src/util/virstring.c +++ b/src/util/virstring.c @@ -238,24 +238,6 @@ virStringListHasString(const char **strings, return false; } -char * -virStringListGetFirstWithPrefix(char **strings, - const char *prefix) -{ - size_t i =3D 0; - - if (!strings) - return NULL; - - while (strings[i]) { - if (STRPREFIX(strings[i], prefix)) - return strings[i] + strlen(prefix); - i++; - } - - return NULL; -} - /* 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 00c669b43b..4705b9c141 100644 --- a/src/util/virstring.h +++ b/src/util/virstring.h @@ -45,9 +45,6 @@ void virStringListFreeCount(char **strings, bool virStringListHasString(const char **strings, const char *needle); -char *virStringListGetFirstWithPrefix(char **strings, - const char *prefix) - ATTRIBUTE_NONNULL(2); int virStrToLong_i(char const *s, char **end_ptr, --=20 2.29.2