mirror of
https://github.com/aljazceru/kata-containers.git
synced 2026-02-21 06:24:23 +01:00
annotations: Simplify negative logic
Replace strange negative logic (!ok -> continue) with positive logic (ok -> do it) Fixes: #901 Signed-off-by: Christophe de Dinechin <dinechin@redhat.com>
This commit is contained in:
committed by
Peng Tao
parent
80144fc415
commit
3f7bcf54f0
@@ -363,11 +363,9 @@ func addAssetAnnotations(ocispec specs.Spec, config *vc.SandboxConfig) {
|
|||||||
|
|
||||||
for _, a := range assetAnnotations {
|
for _, a := range assetAnnotations {
|
||||||
value, ok := ocispec.Annotations[a]
|
value, ok := ocispec.Annotations[a]
|
||||||
if !ok {
|
if ok {
|
||||||
continue
|
config.Annotations[a] = value
|
||||||
}
|
}
|
||||||
|
|
||||||
config.Annotations[a] = value
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user