From 033cc059fa712d930d631471b91f713a08ed4e45 Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Mon, 1 Aug 2022 14:23:20 +0200 Subject: pkg/autoupdate: remove redundant branch [NO NEW TESTS NEEDED] - should not change behavior. Signed-off-by: Valentin Rothberg --- pkg/autoupdate/autoupdate.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'pkg') diff --git a/pkg/autoupdate/autoupdate.go b/pkg/autoupdate/autoupdate.go index 7bda0ac27..7586468a0 100644 --- a/pkg/autoupdate/autoupdate.go +++ b/pkg/autoupdate/autoupdate.go @@ -395,16 +395,16 @@ func (u *updater) imageContainersMap() []error { // Skip labels not related to autoupdate if policy == PolicyDefault { continue - } else { - id, _ := ctr.Image() - policyMap, exists := u.imageToPolicyMapper[id] - if !exists { - policyMap = make(map[Policy][]*libpod.Container) - } - policyMap[policy] = append(policyMap[policy], ctr) - u.imageToPolicyMapper[id] = policyMap - // Now we know that `ctr` is configured for auto updates. } + + id, _ := ctr.Image() + policyMap, exists := u.imageToPolicyMapper[id] + if !exists { + policyMap = make(map[Policy][]*libpod.Container) + } + policyMap[policy] = append(policyMap[policy], ctr) + u.imageToPolicyMapper[id] = policyMap + // Now we know that `ctr` is configured for auto updates. } return errors -- cgit v1.2.3-54-g00ecf