From 0461c60a6e555cd198b5c07160ba0a8cbaf1cb34 Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Fri, 29 May 2015 13:01:37 +0200 Subject: [PATCH] cleanup superfluous variable assignments in aa-mergeprof aa-mergeprof has some sections where it first resets the 'deleted' variable, and then overwrites it again a line or two later. This patch removes the superfluous variable resets. Acked-by: Steve Beattie --- utils/aa-mergeprof | 3 --- 1 file changed, 3 deletions(-) diff --git a/utils/aa-mergeprof b/utils/aa-mergeprof index aebc88386..0dc0f1d23 100755 --- a/utils/aa-mergeprof +++ b/utils/aa-mergeprof @@ -373,7 +373,6 @@ class Merge(object): selection = options[selected] match = apparmor.aa.re_match_include(selection) if match: - deleted = False inc = match deleted = apparmor.aa.delete_duplicates(self.user.aa[profile][hat], inc) self.user.aa[profile][hat]['include'][inc] = True @@ -615,7 +614,6 @@ class Merge(object): match = apparmor.aa.re_match_include(path) if match: inc = match - deleted = 0 deleted = apparmor.aa.delete_duplicates(self.user.aa[profile][hat], inc) self.user.aa[profile][hat]['include'][inc] = True apparmor.aa.changed[profile] = True @@ -789,7 +787,6 @@ class Merge(object): done = True if apparmor.aa.re_match_include(selection): #re.search('#include\s+<.+>$', selection): inc = apparmor.aa.re_match_include(selection) #re.search('#include\s+<(.+)>$', selection).groups()[0] - deleted = 0 deleted = apparmor.aa.delete_duplicates(self.user.aa[profile][hat], inc) self.user.aa[profile][hat]['include'][inc] = True