Fix for loop over value array range issue. (#2187)

This commit is contained in:
Mark Wolfe 2016-12-21 09:56:02 +11:00 committed by Cameron Sparr
parent 8311ff9156
commit 2f521a87d4
1 changed files with 4 additions and 1 deletions

View File

@ -73,7 +73,10 @@ func (s *systemPS) DiskUsage(
var usage []*disk.UsageStat var usage []*disk.UsageStat
var partitions []*disk.PartitionStat var partitions []*disk.PartitionStat
for _, p := range parts { for i := range parts {
p := parts[i]
if len(mountPointFilter) > 0 { if len(mountPointFilter) > 0 {
// If the mount point is not a member of the filter set, // If the mount point is not a member of the filter set,
// don't gather info on it. // don't gather info on it.