moby--moby/profiles
Sebastiaan van Stijn bfd4b64600
seccomp: setupSeccomp(): update errors and remove redundant check
Make the error message slightly more informative, and remove the redundant
`len(config.ArchMap) != 0` check, as iterating over an empty, or 'nil' slice
is a no-op already. This allows to use a slightly more idiomatic "if ok := xx; ok"
condition.

Also move validation to the start of the loop (early return), and explicitly create
a new slice for "names" if the legacy "Name" field is used.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-07-17 15:57:41 +02:00
..
apparmor apparmor: permit signals from unconfined programs 2020-08-11 18:18:58 +10:00
seccomp seccomp: setupSeccomp(): update errors and remove redundant check 2021-07-17 15:57:41 +02:00