mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
oci: fix SA4009: argument e is overwritten before first use (staticcheck)
``` oci/devices_linux.go:64:72: SA4009: argument e is overwritten before first use (staticcheck) ``` Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
bd7180fcf9
commit
4a3ee04351
1 changed files with 2 additions and 1 deletions
|
@ -61,7 +61,8 @@ func DevicesFromPath(pathOnHost, pathInContainer, cgroupPermissions string) (dev
|
||||||
if src, e := os.Stat(resolvedPathOnHost); e == nil && src.IsDir() {
|
if src, e := os.Stat(resolvedPathOnHost); e == nil && src.IsDir() {
|
||||||
|
|
||||||
// mount the internal devices recursively
|
// 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)
|
childDevice, e := devices.DeviceFromPath(dpath, cgroupPermissions)
|
||||||
if e != nil {
|
if e != nil {
|
||||||
// ignore the device
|
// ignore the device
|
||||||
|
|
Loading…
Add table
Reference in a new issue