summaryrefslogtreecommitdiff
path: root/security/selinux/ss/avtab.c
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2023-04-20 18:05:02 +0300
committerPaul Moore <paul@paul-moore.com>2023-05-08 23:49:14 +0300
commit4595ae8c4a10a005a24c0994b710c9575f5b46b9 (patch)
treedf096d88f7c5f5f9e9116b05c2f0a68b088748d8 /security/selinux/ss/avtab.c
parentaeb060ec71547a3fb7f68b8091538e94c5c5187f (diff)
downloadlinux-4595ae8c4a10a005a24c0994b710c9575f5b46b9.tar.xz
selinux: retain const qualifier on string literal in avtab_hash_eval()
The second parameter `tag` of avtab_hash_eval() is only used for printing. In policydb_index() it is called with a string literal: avtab_hash_eval(&p->te_avtab, "rules"); Signed-off-by: Christian Göttsche <cgzones@googlemail.com> [PM: slight formatting tweak in description] Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security/selinux/ss/avtab.c')
-rw-r--r--security/selinux/ss/avtab.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/selinux/ss/avtab.c b/security/selinux/ss/avtab.c
index 8480ec6c6e75..6766edc0fe68 100644
--- a/security/selinux/ss/avtab.c
+++ b/security/selinux/ss/avtab.c
@@ -354,7 +354,7 @@ int avtab_alloc_dup(struct avtab *new, const struct avtab *orig)
return avtab_alloc_common(new, orig->nslot);
}
-void avtab_hash_eval(struct avtab *h, char *tag)
+void avtab_hash_eval(struct avtab *h, const char *tag)
{
int i, chain_len, slots_used, max_chain_len;
unsigned long long chain2_len_sum;