Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Christian Göttsche and committed by
Paul Moore
b0966c7c 241d6a66

+2 -2
+2 -2
security/lsm_audit.c
··· 171 171 172 172 static inline void print_ipv6_addr(struct audit_buffer *ab, 173 173 const struct in6_addr *addr, __be16 port, 174 - char *name1, char *name2) 174 + const char *name1, const char *name2) 175 175 { 176 176 if (!ipv6_addr_any(addr)) 177 177 audit_log_format(ab, " %s=%pI6c", name1, addr); ··· 180 180 } 181 181 182 182 static inline void print_ipv4_addr(struct audit_buffer *ab, __be32 addr, 183 - __be16 port, char *name1, char *name2) 183 + __be16 port, const char *name1, const char *name2) 184 184 { 185 185 if (addr) 186 186 audit_log_format(ab, " %s=%pI4", name1, &addr);