Merge pull request #37054 from tanshanshan/remove-repeat1

Automatic merge from submit-queue (batch tested with PRs 39695, 37054, 39627, 39546, 39615)

remove repeating const declaration

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

remove repeating const declaration  , and avoid const declaration in  loop

Thanks.

**Special notes for your reviewer**:

**Release note**:

```release-note
```
This commit is contained in:
Kubernetes Submit Queue 2017-01-10 18:57:22 -08:00 committed by GitHub
commit 5aa177a81f

View File

@ -97,12 +97,10 @@ func isSysFSWritable() (bool, error) {
}
for _, mountPoint := range mountPoints {
const sysfsDevice = "sysfs"
if mountPoint.Type != sysfsDevice {
continue
}
// Check whether sysfs is 'rw'
const permWritable = "rw"
if len(mountPoint.Opts) > 0 && mountPoint.Opts[0] == permWritable {
return true, nil
}