mirror of https://gitee.com/openkylin/libvirt.git
virDomainDefGetSecurityLabelDef: Fix const correctness
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>
This commit is contained in:
parent
42158b8936
commit
34ce7e7e96
|
@ -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;
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue