Commit c87d4276 authored by zhangjie's avatar zhangjie

Modify the initialization of results in generic_scheduler.go

parent 3537f8fa
...@@ -315,10 +315,8 @@ func PrioritizeNodes( ...@@ -315,10 +315,8 @@ func PrioritizeNodes(
errs = append(errs, err) errs = append(errs, err)
} }
results := make([]schedulerapi.HostPriorityList, 0, len(priorityConfigs)) results := make([]schedulerapi.HostPriorityList, len(priorityConfigs), len(priorityConfigs))
for range priorityConfigs {
results = append(results, nil)
}
for i, priorityConfig := range priorityConfigs { for i, priorityConfig := range priorityConfigs {
if priorityConfig.Function != nil { if priorityConfig.Function != nil {
// DEPRECATED // DEPRECATED
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment