From nobody Sun Feb 8 18:31:19 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=1628263506; cv=none; d=zohomail.com; s=zohoarc; b=YKHaxO+s3ZLWKW4mxELn4LVMngWPDtl/SmCUr5e1ixyzmJNVPObJO7kF+NE1DX3rBobUsSjKL+8ivh1UMHQQY4bEo8PhXP4aDYuxtUGJD/OGjLh3r74QFieRTWGdon/dsgoLXVrUiV5g4AOzignzKQ5oGa5SLtr3BBWQ2AVwKDA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1628263506; 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=rRE0uUysuSIEwsHnSM+KaCv5X5VvE/UgtIQKlbvLhho=; b=Ynuv5T56u02CahaRX4RNGsDXQ3iOFpkB2HLb2bk1gfmZ8zI8PHvbBLcHyw4WtgzPZ065jeGFFujUhxnl6//g/1H7lBNkzJdD/Zcz6mmsIrjgOu8NLp5rjXqOIsHqB06oQ2gvSDNutentbEUUBewD6GHBpqtHFExwvk9YsDV8ydU= 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 1628263506507469.21809259031545; Fri, 6 Aug 2021 08:25:06 -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-484-EJ0SDtAHOPC7nb36HP5QEw-1; Fri, 06 Aug 2021 11:24:45 -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 00F9B1006C83; Fri, 6 Aug 2021 15:24:41 +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 CD9C71001B2C; Fri, 6 Aug 2021 15:24:40 +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 9DDBC4A7CA; Fri, 6 Aug 2021 15:24:40 +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 176FMi4c017521 for ; Fri, 6 Aug 2021 11:22:44 -0400 Received: by smtp.corp.redhat.com (Postfix) id E658919C87; Fri, 6 Aug 2021 15:22:44 +0000 (UTC) Received: from bart.redhat.com (unknown [10.43.2.63]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6F2AF1346F for ; Fri, 6 Aug 2021 15:22:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1628263505; 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=rRE0uUysuSIEwsHnSM+KaCv5X5VvE/UgtIQKlbvLhho=; b=hu55u8JEKA+9TcW3SPaJRFZslUmYiMbxnaB4kf9uGi6Vyu8uSLY7WQBdrfwCTyaZPwXEdv WnmHAfyRG4iTibZZWohtbdl+aYUgBO5GwMR32vsfGB+hZ2a1JAp23Y9EYzo4HnrZ6FZ4B1 x+pq0BOsYWWtZPEJL15OVkQnLmAXlmg= X-MC-Unique: EJ0SDtAHOPC7nb36HP5QEw-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 1/4] virDomainDefGetSecurityLabelDef: Fix const correctness Date: Fri, 6 Aug 2021 17:22:35 +0200 Message-Id: <75dee420d8978bb1fd3a8018ee6f638bc28f05d4.1628263276.git.mprivozn@redhat.com> 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.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) X-ZM-MESSAGEID: 1628263507181100001 Content-Type: text/plain; charset="utf-8" The function doesn't write to domain definition really so make @def argument as const. This allows us to call it from functions where the domain definition is already const. Signed-off-by: Michal Privoznik --- src/conf/domain_conf.c | 2 +- src/conf/domain_conf.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 3415e28b95..14abd527b6 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -29483,7 +29483,7 @@ virDomainDeviceDefCopy(virDomainDeviceDef *src, =20 =20 virSecurityLabelDef * -virDomainDefGetSecurityLabelDef(virDomainDef *def, const char *model) +virDomainDefGetSecurityLabelDef(const virDomainDef *def, const char *model) { size_t i; virSecurityLabelDef *seclabel =3D NULL; diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 9f32bcf9cf..984939cc69 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -3776,7 +3776,7 @@ virDomainObjGetState(virDomainObj *obj, int *reason) ATTRIBUTE_NONNULL(1); =20 virSecurityLabelDef * -virDomainDefGetSecurityLabelDef(virDomainDef *def, const char *model); +virDomainDefGetSecurityLabelDef(const virDomainDef *def, const char *model= ); =20 virSecurityDeviceLabelDef * virDomainChrSourceDefGetSecurityLabelDef(virDomainChrSourceDef *def, --=20 2.31.1