mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-25 15:02:45 +00: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:
parent
2ca9ca892d
commit
2d431c61c6
@ -364,13 +364,11 @@ 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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func addHypervisorConfigOverrides(ocispec specs.Spec, config *vc.SandboxConfig, runtime RuntimeConfig) error {
|
func addHypervisorConfigOverrides(ocispec specs.Spec, config *vc.SandboxConfig, runtime RuntimeConfig) error {
|
||||||
if err := addHypervisorCPUOverrides(ocispec, config); err != nil {
|
if err := addHypervisorCPUOverrides(ocispec, config); err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user