]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virDomainDefGetSecurityLabelDef: Fix const correctness
authorMichal Privoznik <mprivozn@redhat.com>
Fri, 6 Aug 2021 08:30:59 +0000 (10:30 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 16 Aug 2021 07:21:10 +0000 (09:21 +0200)
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 <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Tested-by: Ján Tomko <jtomko@redhat.com>
src/conf/domain_conf.c
src/conf/domain_conf.h

index 16cbb7d0c324b722dfd55d1807a2aab40ac571c1..e8b0f00ad6284938e8091bcbe30ff3d80e596ece 100644 (file)
@@ -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;
index 9f32bcf9cf9b76f72da52f3371e6dda48195b536..984939cc69913548c9ff9b32ef29fdb23857577a 100644 (file)
@@ -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,