From 34ce7e7e96452550031f0c92b767139de0ed2fda Mon Sep 17 00:00:00 2001 From: Michal Privoznik Date: Fri, 6 Aug 2021 10:30:59 +0200 Subject: [PATCH] virDomainDefGetSecurityLabelDef: Fix const correctness MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Pavel Hrdina Tested-by: Ján Tomko --- 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 16cbb7d0c3..e8b0f00ad6 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -29481,7 +29481,7 @@ virDomainDeviceDefCopy(virDomainDeviceDef *src, virSecurityLabelDef * -virDomainDefGetSecurityLabelDef(virDomainDef *def, const char *model) +virDomainDefGetSecurityLabelDef(const virDomainDef *def, const char *model) { size_t i; virSecurityLabelDef *seclabel = 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); virSecurityLabelDef * -virDomainDefGetSecurityLabelDef(virDomainDef *def, const char *model); +virDomainDefGetSecurityLabelDef(const virDomainDef *def, const char *model); virSecurityDeviceLabelDef * virDomainChrSourceDefGetSecurityLabelDef(virDomainChrSourceDef *def, -- 2.47.2