From nobody Mon Feb 9 14:02:46 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1628177712; cv=none; d=zohomail.com; s=zohoarc; b=jy3J/XF4N6E5xLrPA/dWaYFymeJK8y+HwvX1/lT1yHL89yXbnf7VDo4ixFBG023H8EVOpPWlzr9vYFIPCyimGLXfPTz5pqb9ursYDbNV28oAT2/OM780zHdSfse+tRi15MLN8pYpX98Ifhk98X0Pue/myUmqH6KaeLDSLnmxYqE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1628177712; 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=qTJ7jqxjnC9VcfeOUYCAV1InxpNM7kDvYwAyqWksfFo=; b=YkXrIzD9P3oWtB9N+qIMt4eMFdoFse7coumL7n8t6LIsTWGNVGrL6FD/naauv2lHg95IKMJrP9qubPTN1l0+T10LYV9uUhRjs9SxPYNO0Rjb1R/7zPUjazS73LlmX9D/JyGvfQD5UZEbLHg0btwtdVzLYhSIY6hEGSNWTg3K5K4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.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 [216.205.24.124]) by mx.zohomail.com with SMTPS id 1628177712117591.7309262682655; Thu, 5 Aug 2021 08:35:12 -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-559-n7KYduGaMZa1x07XleeLtg-1; Thu, 05 Aug 2021 11:35:09 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 34E10801A92; Thu, 5 Aug 2021 15:35:04 +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 11A8D5F724; Thu, 5 Aug 2021 15:35:04 +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 CD34B4A70C; Thu, 5 Aug 2021 15:35:03 +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 175FYwIB027783 for ; Thu, 5 Aug 2021 11:34:58 -0400 Received: by smtp.corp.redhat.com (Postfix) id 3BF2F18401; Thu, 5 Aug 2021 15:34:58 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8FC855D6B1 for ; Thu, 5 Aug 2021 15:34:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1628177711; 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=qTJ7jqxjnC9VcfeOUYCAV1InxpNM7kDvYwAyqWksfFo=; b=Z2Yi3BFgP3h6aE1vehIKsj9uh4iBU1B9CDRQWAeItjQjd2VopdkUALE2qnJB6frfc5/aGc PPPNgVQ723oJxCPzV4e6lPTOuJ83n//0rNGJS47a4ljUp/G/BnZXc+Vr6X1poE1AFRwIbi 94j6W99c2JCO5lx1unXLzvvs9tVIOQg= X-MC-Unique: n7KYduGaMZa1x07XleeLtg-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 10/13] qemuNamespaceMknodPaths: Remove 'ndevMountsPath' Date: Thu, 5 Aug 2021 17:34:26 +0200 Message-Id: <5edb2754e2123b069ce22d5196947d6956219d9e.1628176883.git.pkrempa@redhat.com> 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 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.16 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: 1628177713287100005 Content-Type: text/plain; charset="utf-8" 'devMountsPath' can be converted to an auto-cleared stringlist and thus asking for the number of entries is not necessary. Signed-off-by: Peter Krempa --- src/qemu/qemu_namespace.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_namespace.c b/src/qemu/qemu_namespace.c index 06169922b9..b2e6ecb71a 100644 --- a/src/qemu/qemu_namespace.c +++ b/src/qemu/qemu_namespace.c @@ -1250,8 +1250,7 @@ qemuNamespaceMknodPaths(virDomainObj *vm, qemuDomainObjPrivate *priv =3D vm->privateData; virQEMUDriver *driver =3D priv->driver; g_autoptr(virQEMUDriverConfig) cfg =3D NULL; - char **devMountsPath =3D NULL; - size_t ndevMountsPath =3D 0; + g_auto(GStrv) devMountsPath =3D NULL; qemuNamespaceMknodData data =3D { 0 }; size_t i; int ret =3D -1; @@ -1261,9 +1260,7 @@ qemuNamespaceMknodPaths(virDomainObj *vm, return 0; cfg =3D virQEMUDriverGetConfig(driver); - if (qemuDomainGetPreservedMounts(cfg, vm, - &devMountsPath, NULL, - &ndevMountsPath) < 0) + if (qemuDomainGetPreservedMounts(cfg, vm, &devMountsPath, NULL, NULL) = < 0) return -1; data.driver =3D driver; @@ -1304,7 +1301,6 @@ qemuNamespaceMknodPaths(virDomainObj *vm, } } qemuNamespaceMknodDataClear(&data); - virStringListFreeCount(devMountsPath, ndevMountsPath); return ret; } --=20 2.31.1