Merge pull request #120397 from ty-dc/StaticCheck

cleanup: omit comparison with bool constants
This commit is contained in:
Kubernetes Prow Robot
2023-10-24 05:25:52 +02:00
committed by GitHub
33 changed files with 57 additions and 57 deletions

View File

@@ -3415,7 +3415,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
}