mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-31 06:16:03 +00:00
handle_children: don't initialize variables that get always set
All the variables initialized at the start of the function always get overwritten in the loop, therefore it's superfluous to initialize them. Also inline 'entries' to the only place that uses it.
This commit is contained in:
@@ -903,20 +903,9 @@ def handle_hashlog(hashlog):
|
||||
prelog[aamode][profile][hat][typ] = hashlog[aamode][full_profile][typ]
|
||||
|
||||
def handle_children(profile, hat, root):
|
||||
entries = root[:]
|
||||
pid = None
|
||||
p = None
|
||||
h = None
|
||||
prog = None
|
||||
aamode = None
|
||||
mode = None
|
||||
detail = None
|
||||
to_name = None
|
||||
uhat = None
|
||||
|
||||
regex_nullcomplain = re.compile('^null(-complain)*-profile$')
|
||||
|
||||
for entry in entries:
|
||||
for entry in root[:]:
|
||||
if type(entry[0]) != str:
|
||||
handle_children(profile, hat, entry)
|
||||
else:
|
||||
|
Reference in New Issue
Block a user