Skip to content

Commit b0966c7

Browse files
cgzonespcmoore
authored andcommitted
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 <[email protected]> [PM: cleaned up the description to remove long lines] Signed-off-by: Paul Moore <[email protected]>
1 parent 241d6a6 commit b0966c7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

security/lsm_audit.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ int ipv6_skb_to_auditdata(struct sk_buff *skb,
171171

172172
static inline void print_ipv6_addr(struct audit_buffer *ab,
173173
const struct in6_addr *addr, __be16 port,
174-
char *name1, char *name2)
174+
const char *name1, const char *name2)
175175
{
176176
if (!ipv6_addr_any(addr))
177177
audit_log_format(ab, " %s=%pI6c", name1, addr);
@@ -180,7 +180,7 @@ static inline void print_ipv6_addr(struct audit_buffer *ab,
180180
}
181181

182182
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)
184184
{
185185
if (addr)
186186
audit_log_format(ab, " %s=%pI4", name1, &addr);

0 commit comments

Comments
 (0)