mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 20:53:33 +00:00
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:
commit
5aa177a81f
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user