mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf.git
synced 2026-04-05 00:08:32 -04:00
audit: purge unnecessary list_empty calls
The original conditions that led to the use of list_empty() to optimize list_for_each_entry_rcu() in auditfilter.c and auditsc.c code have been removed without removing the list_empty() call, but this code example has been copied several times. Remove the unnecessary list_empty() calls. Please see upstream github issue https://github.com/linux-audit/audit-kernel/issues/112 Signed-off-by: Richard Guy Briggs <rgb@redhat.com> Signed-off-by: Paul Moore <paul@paul-moore.com>
This commit is contained in:
committed by
Paul Moore
parent
a1aa08a01f
commit
699c1868a7
@@ -1315,8 +1315,6 @@ int audit_filter(int msgtype, unsigned int listtype)
|
||||
int ret = 1; /* Audit by default */
|
||||
|
||||
rcu_read_lock();
|
||||
if (list_empty(&audit_filter_list[listtype]))
|
||||
goto unlock_and_return;
|
||||
list_for_each_entry_rcu(e, &audit_filter_list[listtype], list) {
|
||||
int i, result = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user