mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-24 11:29:09 +00:00
Modify the initialization of results in generic_scheduler.go
Signed-off-by: zhangjie <zhangjie0619@yeah.net>
This commit is contained in:
@@ -315,10 +315,8 @@ func PrioritizeNodes(
|
||||
errs = append(errs, err)
|
||||
}
|
||||
|
||||
results := make([]schedulerapi.HostPriorityList, 0, len(priorityConfigs))
|
||||
for range priorityConfigs {
|
||||
results = append(results, nil)
|
||||
}
|
||||
results := make([]schedulerapi.HostPriorityList, len(priorityConfigs), len(priorityConfigs))
|
||||
|
||||
for i, priorityConfig := range priorityConfigs {
|
||||
if priorityConfig.Function != nil {
|
||||
// DEPRECATED
|
||||
|
Reference in New Issue
Block a user