Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.

Commit f4dd729

Browse files
c3dfidencio
authored andcommitted
annotations: Simplify negative logic
Replace strange negative logic (!ok -> continue) with positive logic (ok -> do it) Fixes: #3004 Signed-off-by: Christophe de Dinechin <[email protected]>
1 parent 7542405 commit f4dd729

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

virtcontainers/pkg/oci/utils.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -375,11 +375,9 @@ func addAssetAnnotations(ocispec specs.Spec, config *vc.SandboxConfig) error {
375375

376376
for _, a := range assetAnnotations {
377377
value, ok := ocispec.Annotations[a]
378-
if !ok {
379-
continue
378+
if ok {
379+
config.Annotations[a] = value
380380
}
381-
382-
config.Annotations[a] = value
383381
}
384382

385383
return nil

0 commit comments

Comments
 (0)