From nobody Mon Feb 9 00:56:19 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=1620201766; cv=none; d=zohomail.com; s=zohoarc; b=cQ4o2ODE9KExyOPbe0WiqYxYkYlRsdsfev7Hp5hgaKVXs6v1Tnb5pwbTrsB/p5AT80cS9uqj4dpZyJl5SI7Oke0zgZFJtH7gmmERPYhpfRt2G3K0L5xVyWhWGboanRpT9a313p3zsQ/7t1G7MkAh5nielZIRGRBbMrwRUebZF/g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1620201766; 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=F2BsXG4eRny27Ex6ymq8m/9wj+yrK8bE9Rzf8+jD/7o=; b=AR7FcVJTDCyS9qpMMEu4aT6HsndeWJ6AEVzT4BF236Z+yQpS/vSa2jX+3N0fH5NsQVb0BszWADnGkO71KNEhBLTiQDHA5w6SA3Dp+6BOZxdcE6m9iBeaU5OjLu8iE3Ha3AL1eZh2i7slgUrLNuRCzz2e0vKQWugLmdNYd7c14Ws= 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) header.from= 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 1620201766103850.1113422732748; Wed, 5 May 2021 01:02: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-165-aA8WVJceN2ePIscIreKCBw-1; Wed, 05 May 2021 04:02:42 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AE3EB1006C81; Wed, 5 May 2021 08:02:36 +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 681121043293; Wed, 5 May 2021 08:02: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 ED34C180B464; Wed, 5 May 2021 08:02:34 +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 14582WWR007784 for ; Wed, 5 May 2021 04:02:32 -0400 Received: by smtp.corp.redhat.com (Postfix) id E09605D9E3; Wed, 5 May 2021 08:02:32 +0000 (UTC) Received: from localhost.localdomain (unknown [10.40.194.235]) by smtp.corp.redhat.com (Postfix) with ESMTP id 60C3C5D9E2 for ; Wed, 5 May 2021 08:02:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620201765; 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=F2BsXG4eRny27Ex6ymq8m/9wj+yrK8bE9Rzf8+jD/7o=; b=dTWXVR1QXJDK8+LJCcvJ3WK2oBHIV6duxR7XwWFHQYQf9vjRFCeykPbOdc4DRSqIYB3g5n KWTYCc1NR3hYQmUBJeqiFyNEnM8l5erwjjop04g6NcmlQwnKF5nYhJxQ2MD+zS7jWDVNv/ uit3/rVHfjljPnPk801fq32SONwTlbA= X-MC-Unique: aA8WVJceN2ePIscIreKCBw-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 1/5] virCapabilitiesHostNUMAFormat: Swap order of arguments Date: Wed, 5 May 2021 10:02:20 +0200 Message-Id: <7181152854cb4292a9c982f120817ce2d723d23c.1620201674.git.mprivozn@redhat.com> 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.84 on 10.5.11.22 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" The rest of virCapabilities format functions take virBuffer as the first argument and struct to format as the second. Also, they accept NULL (as the second argument). Fix virCapabilitiesHostNUMAFormat() so that it follows this logic. Signed-off-by: Michal Privoznik --- src/conf/capabilities.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/conf/capabilities.c b/src/conf/capabilities.c index 9bd59b3cbf..084e09286d 100644 --- a/src/conf/capabilities.c +++ b/src/conf/capabilities.c @@ -794,13 +794,16 @@ virCapabilitiesAddStoragePool(virCaps *caps, =20 =20 static int -virCapabilitiesHostNUMAFormat(virCapsHostNUMA *caps, - virBuffer *buf) +virCapabilitiesHostNUMAFormat(virBuffer *buf, + virCapsHostNUMA *caps) { size_t i; size_t j; char *siblings; =20 + if (!caps) + return 0; + virBufferAddLit(buf, "\n"); virBufferAdjustIndent(buf, 2); virBufferAsprintf(buf, "\n", caps->cells->len); @@ -1125,8 +1128,7 @@ virCapabilitiesFormatHostXML(virCapsHost *host, virBufferAsprintf(buf, "%s\n", host->netprefix); =20 - if (host->numa && - virCapabilitiesHostNUMAFormat(host->numa, buf) < 0) + if (virCapabilitiesHostNUMAFormat(buf, host->numa) < 0) return -1; =20 if (virCapabilitiesFormatCaches(buf, &host->cache) < 0) --=20 2.26.3