Skip to content

Commit

Permalink
Remove unnecessary judgment
Browse files Browse the repository at this point in the history
  • Loading branch information
ZP-AlwaysWin committed Nov 9, 2019
1 parent f9acca8 commit 50b8368
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/scheduler/algorithm/predicates/utils.go
Expand Up @@ -67,7 +67,7 @@ func FilterPodsByNamespace(pods []*v1.Pod, ns string) []*v1.Pod {

// CreateSelectorFromLabels is used to define a selector that corresponds to the keys in a map.
func CreateSelectorFromLabels(aL map[string]string) labels.Selector {
if aL == nil || len(aL) == 0 {
if len(aL) == 0 {
return labels.Everything()
}
return labels.Set(aL).AsSelector()
Expand Down

0 comments on commit 50b8368

Please sign in to comment.