aboutsummaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorValentin Rothberg <vrothberg@redhat.com>2022-08-01 14:23:20 +0200
committerValentin Rothberg <vrothberg@redhat.com>2022-08-04 13:07:58 +0200
commit033cc059fa712d930d631471b91f713a08ed4e45 (patch)
tree8f8d2f7dd52b47a6e8975d9a82eb4e848195baad /pkg
parent328c8ba7b4567f69602cf6bc71f7a2f0efb5c969 (diff)
downloadpodman-033cc059fa712d930d631471b91f713a08ed4e45.tar.gz
podman-033cc059fa712d930d631471b91f713a08ed4e45.tar.bz2
podman-033cc059fa712d930d631471b91f713a08ed4e45.zip
pkg/autoupdate: remove redundant branch
[NO NEW TESTS NEEDED] - should not change behavior. Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
Diffstat (limited to 'pkg')
-rw-r--r--pkg/autoupdate/autoupdate.go18
1 files changed, 9 insertions, 9 deletions
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