Merge pull request #50669 from jiulongzaitian/myfeature

Automatic merge from submit-queue (batch tested with PRs 51224, 51191, 51158, 50669, 51222)

Modify the initialization of results in generic_scheduler.go

Signed-off-by: zhangjie <zhangjie0619@yeah.net>



**What this PR does / why we need it**:

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue 2017-08-24 22:59:35 -07:00 committed by GitHub
commit 2e516943dc

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