aboutsummaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds2022-08-02 14:56:25 -0700
committerLinus Torvalds2022-08-02 14:56:25 -0700
commitf42e1e3e40da02924e29987c5b721c0932d9b380 (patch)
tree7335979adbc6dfd64dc3d7fed556cf7b5f3ab4eb /kernel
parent79802ada87faeb28cfa2bd36e17591e7b8c6ba72 (diff)
parent546093206ba16623c18e344630dbfdd71a4327e0 (diff)
Merge tag 'audit-pr-20220801' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit
Pull audit updates from Paul Moore: "Two minor audit patches: on marks a function as static, the other removes a redundant length check" * tag 'audit-pr-20220801' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit: audit: make is_audit_feature_set() static audit: remove redundant data_len check
Diffstat (limited to 'kernel')
-rw-r--r--kernel/audit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/audit.c b/kernel/audit.c
index 7690c29d4ee4..a75978ae38ad 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -1100,7 +1100,7 @@ static inline void audit_log_user_recv_msg(struct audit_buffer **ab,
audit_log_common_recv_msg(NULL, ab, msg_type);
}
-int is_audit_feature_set(int i)
+static int is_audit_feature_set(int i)
{
return af.features & AUDIT_FEATURE_TO_MASK(i);
}
@@ -1390,7 +1390,7 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
str);
} else {
audit_log_format(ab, " data=");
- if (data_len > 0 && str[data_len - 1] == '\0')
+ if (str[data_len - 1] == '\0')
data_len--;
audit_log_n_untrustedstring(ab, str, data_len);
}