From nobody Mon Feb 9 06:33:56 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=1628075026; cv=none; d=zohomail.com; s=zohoarc; b=VBkg6bXIE0ot2yBXR1L3XvzB23IHUML9UM0TqzpGvBl6z15FArsvFeOQH2clHLnTQeddrd64PBKxrGb0ZP+VhMNB3bc6wOQh2exLc6hEtXSPxF2fvxNc6Ph8OZM2tKQSJqW74hUjzI6ww74XoI3ZAGFTDcRyvEbFT1JqAq5Kh9Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1628075026; 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=Lzwi7XqXwWkqwtgPLlgO4cpSUgkzQ0+UlU96xhHql1A=; b=b6PoWPZ2Q+/q49ebhAURlFfujhdNo3MaDI6XUC6u07LYPAQrQ5JTEUR0P058OpZOLytHXjUh6QtsTlZrVDJAmBp1AQq0K6EzF7f1+3xxm94ivHQoLem1tuFMDvgTxsPImNvFgcrhw4B41jn4eD/hzJeLEQsl+LVbjZGuvn8HTYU= 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) 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 1628075026702505.209586270895; Wed, 4 Aug 2021 04:03:46 -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-58-h5WOdnwSNLWVanZHXd5cBA-1; Wed, 04 Aug 2021 07:03:43 -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 163432FD1D; Wed, 4 Aug 2021 11:03:37 +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 EFB91779D0; Wed, 4 Aug 2021 11:03:36 +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 BC3FA4A70B; Wed, 4 Aug 2021 11:03:36 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 174B2wSI014248 for ; Wed, 4 Aug 2021 07:02:58 -0400 Received: by smtp.corp.redhat.com (Postfix) id 306111383C; Wed, 4 Aug 2021 11:02:58 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8374A5D9DC for ; Wed, 4 Aug 2021 11:02:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1628075025; 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=Lzwi7XqXwWkqwtgPLlgO4cpSUgkzQ0+UlU96xhHql1A=; b=LTC/LWXXDtO3p1/Apap8ylikdr2SyU7TD9yQ06b/dZ+u02EUf8kKa955cw5VPFgaKJV1mA RbuTaYNDZf284pRhV3TYYx63wFLm17pdHAUeLoJK1bmJnZZYxCqOOlcxodCVKmDULdI+1w hrpke3gThFLLSbdcs/z0OmjyVXR1w7E= X-MC-Unique: h5WOdnwSNLWVanZHXd5cBA-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 08/23] util: alloc: Completely replace VIR_APPEND_ELEMENT_QUIET by VIR_APPEND_ELEMENT Date: Wed, 4 Aug 2021 13:02:28 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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) X-ZM-MESSAGEID: 1628075028723100011 Content-Type: text/plain; charset="utf-8" VIR_APPEND_ELEMENT doesn't report any errors now so we can remove VIR_APPEND_ELEMENT_QUIET and replace all uses by VIR_APPEND_ELEMENT Signed-off-by: Peter Krempa --- src/util/viralloc.h | 5 ----- tests/virfilewrapper.c | 4 ++-- tests/virpcimock.c | 6 +++--- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/util/viralloc.h b/src/util/viralloc.h index f02d634eea..3a09af65c5 100644 --- a/src/util/viralloc.h +++ b/src/util/viralloc.h @@ -243,11 +243,6 @@ int virDeleteElementsN(void *ptrptr, size_t size, size= _t at, size_t *countptr, VIR_TYPEMATCH(ptr, &(newelem)), \ &(newelem), false, true) -/* Quiet version of macros above */ -#define VIR_APPEND_ELEMENT_QUIET(ptr, count, newelem) \ - virAppendElement(&(ptr), sizeof(*(ptr)), &(count), \ - VIR_TYPEMATCH(ptr, &(newelem)), &(newelem), true, fal= se) - /** * VIR_DELETE_ELEMENT: * @ptr: pointer to array of objects (*not* ptr to ptr) diff --git a/tests/virfilewrapper.c b/tests/virfilewrapper.c index 3085a190fb..aaff39866d 100644 --- a/tests/virfilewrapper.c +++ b/tests/virfilewrapper.c @@ -78,8 +78,8 @@ virFileWrapperAddPrefix(const char *prefix, init_syms(); - VIR_APPEND_ELEMENT_QUIET(prefixes, nprefixes, prefix); - VIR_APPEND_ELEMENT_QUIET(overrides, noverrides, override); + VIR_APPEND_ELEMENT(prefixes, nprefixes, prefix); + VIR_APPEND_ELEMENT(overrides, noverrides, override); } diff --git a/tests/virpcimock.c b/tests/virpcimock.c index de39fc65a4..ead810d412 100644 --- a/tests/virpcimock.c +++ b/tests/virpcimock.c @@ -428,7 +428,7 @@ pci_device_create_iommu(const struct pciDevice *dev, iommuGroup->iommu =3D dev->iommuGroup; iommuGroup->nDevicesBoundToVFIO =3D 0; /* No device bound to VFIO by d= efault */ - VIR_APPEND_ELEMENT_QUIET(pciIommuGroups, npciIommuGroups, iommuGroup); + VIR_APPEND_ELEMENT(pciIommuGroups, npciIommuGroups, iommuGroup); } @@ -542,7 +542,7 @@ pci_device_new_from_stub(const struct pciDevice *data) if (pci_device_autobind(dev) < 0) ABORT("Unable to bind: %s", devid); - VIR_APPEND_ELEMENT_QUIET(pciDevices, nPCIDevices, dev); + VIR_APPEND_ELEMENT(pciDevices, nPCIDevices, dev); } static struct pciDevice * @@ -713,7 +713,7 @@ pci_driver_new(const char *name, ...) make_file(driverpath, "bind", NULL, -1); make_file(driverpath, "unbind", NULL, -1); - VIR_APPEND_ELEMENT_QUIET(pciDrivers, nPCIDrivers, driver); + VIR_APPEND_ELEMENT(pciDrivers, nPCIDrivers, driver); } static struct pciDriver * --=20 2.31.1