Small fix for GetAllCgroups().

Incorrect parsing of length of fields.

Docker-DCO-1.1-Signed-off-by: Victor Marmol <vmarmol@google.com> (github: vmarmol)
This commit is contained in:
Victor Marmol 2014-07-21 18:55:06 -07:00
parent 47d9567ccf
commit de63d7006b
1 changed files with 1 additions and 1 deletions

View File

@ -97,7 +97,7 @@ func GetAllSubsystems() ([]string, error) {
text := s.Text()
if text[0] != '#' {
parts := strings.Fields(text)
if len(parts) > 4 && parts[3] != "0" {
if len(parts) >= 4 && parts[3] != "0" {
subsystems = append(subsystems, parts[0])
}
}