Skip to content

Commit

Permalink
Fix issue #12: break too early (#13)
Browse files Browse the repository at this point in the history
After getting CapBnd, Loop break too early,
can't to get CapAmb value.

Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
  • Loading branch information
Ma Shimiao authored and syndtr committed Jul 4, 2017
1 parent e7cb7fa commit db04d3c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions capability/capability_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -428,11 +428,11 @@ func (c *capsV3) Load() (err error) {
}
if strings.HasPrefix(line, "CapB") {
fmt.Sscanf(line[4:], "nd: %08x%08x", &c.bounds[1], &c.bounds[0])
break
continue
}
if strings.HasPrefix(line, "CapA") {
fmt.Sscanf(line[4:], "mb: %08x%08x", &c.ambient[1], &c.ambient[0])
break
continue
}
}
f.Close()
Expand Down

0 comments on commit db04d3c

Please sign in to comment.