2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-31 14:25:52 +00:00

drop unused 'finishing' in do_logprof_pass()

finishing was always false, resulting in always returning 'NORMAL'.

Remove the variable, remove the unused condition - and change the only
place (aa-genprof) that expected a return value from do_logprof_pass()
to not expect it anymore.

found by Coverity, CID 198637
This commit is contained in:
Christian Boltz
2019-05-17 22:24:07 +02:00
parent 758a6b214f
commit 5abfb08a3e
2 changed files with 1 additions and 12 deletions

View File

@@ -160,10 +160,8 @@ while not done_profiling:
ans, arg = q.promptUser('noexit')
if ans == 'CMD_SCAN':
lp_ret = apparmor.do_logprof_pass(logmark, passno)
apparmor.do_logprof_pass(logmark, passno)
passno += 1
if lp_ret == 'FINISHED':
done_profiling = True
else:
done_profiling = True

View File

@@ -1701,8 +1701,6 @@ def do_logprof_pass(logmark='', passno=0):
ask_the_questions(log_dict)
finishing = False
# Check for finished
save_profiles()
##if not repo_cfg['repository'].get('upload', False) or repo['repository']['upload'] == 'later':
@@ -1712,13 +1710,6 @@ def do_logprof_pass(logmark='', passno=0):
## sync_profiles()
## created = []
# If user selects 'Finish' then we want to exit logprof
if finishing:
return 'FINISHED'
else:
return 'NORMAL'
def save_profiles():
# Ensure the changed profiles are actual active profiles
for prof_name in changed.keys():