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:
Michal Privoznik 2021-08-06 10:30:59 +02:00
parent 42158b8936
commit 34ce7e7e96
2 changed files with 2 additions and 2 deletions

View 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;

View 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,