summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2024-11-25 11:59:24 +0100
committerPaul Moore <paul@paul-moore.com>2025-01-04 22:04:39 -0500
commitb0966c7c816a0be9a34cdf4fb16fdb89560af623 (patch)
treec1765cfff3fcd72606eae9593b09d1fcedd01218 /security
parent241d6a66404c975415fd0facaf70d61b37248f50 (diff)
lsm: constify function parameters
The functions print_ipv4_addr() and print_ipv6_addr() are called with string literals and do not modify these parameters internally. Signed-off-by: Christian Göttsche <cgzones@googlemail.com> [PM: cleaned up the description to remove long lines] Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security')
-rw-r--r--security/lsm_audit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/security/lsm_audit.c b/security/lsm_audit.c
index 9a8352972086..8df6f77a7526 100644
--- a/security/lsm_audit.c
+++ b/security/lsm_audit.c
@@ -171,7 +171,7 @@ int ipv6_skb_to_auditdata(struct sk_buff *skb,
static inline void print_ipv6_addr(struct audit_buffer *ab,
const struct in6_addr *addr, __be16 port,
- char *name1, char *name2)
+ const char *name1, const char *name2)
{
if (!ipv6_addr_any(addr))
audit_log_format(ab, " %s=%pI6c", name1, addr);
@@ -180,7 +180,7 @@ static inline void print_ipv6_addr(struct audit_buffer *ab,
}
static inline void print_ipv4_addr(struct audit_buffer *ab, __be32 addr,
- __be16 port, char *name1, char *name2)
+ __be16 port, const char *name1, const char *name2)
{
if (addr)
audit_log_format(ab, " %s=%pI4", name1, &addr);