mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 00:14:44 +01:00
Clarify duplicate insertion logic in parser_alias.c:process_entries
Signed-off-by: Ryan Lee <ryan.lee@canonical.com>
This commit is contained in:
parent
f24fc4841f
commit
9689e3a39f
1 changed files with 4 additions and 2 deletions
|
@ -142,8 +142,10 @@ static void process_entries(const void *nodep, VISIT value, int level unused)
|
|||
}
|
||||
if (dup) {
|
||||
dup->alias_ignore = true;
|
||||
/* adds to the front of the list, list iteratition
|
||||
* will skip it
|
||||
/* The original entry->next is in dup->next, so we don't lose
|
||||
* any of the original elements of the linked list. Also, by
|
||||
* setting dup->alias_ignore, we trigger the check at the start
|
||||
* of the loop, skipping the new entry we just inserted.
|
||||
*/
|
||||
entry->next = dup;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue