Skip to content

Commit

Permalink
oci: fix SA4009: argument e is overwritten before first use (staticch…
Browse files Browse the repository at this point in the history
…eck)

```
oci/devices_linux.go:64:72: SA4009: argument e is overwritten before first use (staticcheck)
```

Signed-off-by: Sebastiaan van Stijn <[email protected]>
  • Loading branch information
thaJeztah committed Sep 18, 2019
1 parent bd7180f commit 4a3ee04
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion oci/devices_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ func DevicesFromPath(pathOnHost, pathInContainer, cgroupPermissions string) (dev
if src, e := os.Stat(resolvedPathOnHost); e == nil && src.IsDir() {

// mount the internal devices recursively
filepath.Walk(resolvedPathOnHost, func(dpath string, f os.FileInfo, e error) error {
// TODO check if additional errors should be handled or logged
_ = filepath.Walk(resolvedPathOnHost, func(dpath string, f os.FileInfo, _ error) error {
childDevice, e := devices.DeviceFromPath(dpath, cgroupPermissions)
if e != nil {
// ignore the device
Expand Down

0 comments on commit 4a3ee04

Please sign in to comment.