cleanup: omit comparison with bool constants

Signed-off-by: tao.yang <tao.yang@daocloud.io>
This commit is contained in:
tao.yang
2023-09-04 16:59:23 +08:00
parent d4050a80c7
commit b35357b6c0
33 changed files with 57 additions and 57 deletions

View File

@@ -3365,7 +3365,7 @@ func validateHostUsers(spec *core.PodSpec, fldPath *field.Path) field.ErrorList
// Only make the following checks if hostUsers is false (otherwise, the container uses the
// same userns as the host, and so there isn't anything to check).
if spec.SecurityContext == nil || spec.SecurityContext.HostUsers == nil || *spec.SecurityContext.HostUsers == true {
if spec.SecurityContext == nil || spec.SecurityContext.HostUsers == nil || *spec.SecurityContext.HostUsers {
return allErrs
}