Modify the initialization of results in generic_scheduler.go

Signed-off-by: zhangjie <zhangjie0619@yeah.net>
This commit is contained in:
zhangjie 2017-08-15 16:14:44 +08:00
parent 3537f8fa34
commit c87d42763d

View File

@ -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