From nobody Mon Feb 9 00:06:55 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 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=1590493406; cv=none; d=zohomail.com; s=zohoarc; b=WEDguBhKmfLZSB0Wq+/BD9K8h7cfNIQkZMKurS3EmDWHvrP7BUoavKkXA37ZU4AvFtBZkCIM6Qk9qnY5kyCuk/3morSPb1dRErZaK3EpmhTRXFjWqVV2/RWfUFpdGW+QiwMV/dmX13wEiHN30dcHm01RNQsVC/+GEtbtDVtHA0k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590493406; 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=YltOotsalkyYMjhHAJ8gx00IAPIA6YPNqUPJFcZKagU=; b=Zl+JWZ7SK2plT3rFCqsip7BgDmCkb5dE51KOoCB6e7hA8LjbgNbK+ZzH+s5EpXsS6MXVSEJa4Hc+GtdbSuLby2xS6nDkMBvRe0eeaXL8IzxtR0xPGRQq67U6QUeL2K6LodOpdji4eYTrAxoJI0UEGi9Ug/LtkjKy3tXPJqU5yB8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 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-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1590493406174657.0252569958675; Tue, 26 May 2020 04:43:26 -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-149-tcjTWxQBO8qOpj_3Z6QV3Q-1; Tue, 26 May 2020 07:43:23 -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 785F181CBF5; Tue, 26 May 2020 11:43:16 +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 591519007F; Tue, 26 May 2020 11:43:16 +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 269CB6B495; Tue, 26 May 2020 11:43:16 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 04QBh5JM004467 for ; Tue, 26 May 2020 07:43:05 -0400 Received: by smtp.corp.redhat.com (Postfix) id DFEE079C35; Tue, 26 May 2020 11:43:05 +0000 (UTC) Received: from localhost.localdomain (unknown [10.40.195.106]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5FD62649D5 for ; Tue, 26 May 2020 11:43:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1590493405; 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=YltOotsalkyYMjhHAJ8gx00IAPIA6YPNqUPJFcZKagU=; b=VhtO/J/aiwQ3A/aJNc8wUylNO3eVp5mH8qFep10v8qNFkVRz+8ugezO1Yggd4SUaOf6RuN 8jBe1+0YX4PHOcJwXwGNT091IrJhVAYSfzK5gc7x6oIbs0BcjhHczdeUHkkQFWB8lZ7QwJ M9EZhkvAB1J9YHfA3skf0tDJj3j82u0= X-MC-Unique: tcjTWxQBO8qOpj_3Z6QV3Q-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 4/8] qemuBuildMemoryBackendProps: Fix const correctness Date: Tue, 26 May 2020 13:42:53 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 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 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 objects at @def and @mem pointers is only read and not written. Make the arguments const to make that explicit. Signed-off-by: Michal Privoznik --- src/qemu/qemu_command.c | 4 ++-- src/qemu/qemu_command.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 5b845ef903..14c780cf4f 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -2993,8 +2993,8 @@ qemuBuildMemoryBackendProps(virJSONValuePtr *backendP= rops, const char *alias, virQEMUDriverConfigPtr cfg, qemuDomainObjPrivatePtr priv, - virDomainDefPtr def, - virDomainMemoryDefPtr mem, + const virDomainDef *def, + const virDomainMemoryDef *mem, bool force) { const char *backendType =3D "memory-backend-file"; diff --git a/src/qemu/qemu_command.h b/src/qemu/qemu_command.h index 55bc67072a..9f7283bb91 100644 --- a/src/qemu/qemu_command.h +++ b/src/qemu/qemu_command.h @@ -150,8 +150,8 @@ int qemuBuildMemoryBackendProps(virJSONValuePtr *backen= dProps, const char *alias, virQEMUDriverConfigPtr cfg, qemuDomainObjPrivatePtr priv, - virDomainDefPtr def, - virDomainMemoryDefPtr mem, + const virDomainDef *def, + const virDomainMemoryDef *mem, bool force); =20 char *qemuBuildMemoryDeviceStr(virDomainMemoryDefPtr mem, --=20 2.26.2