Skip to content

Commit

Permalink
Remove ineffectual assignments in udev_test.go (#167)
Browse files Browse the repository at this point in the history
According to the Go Report Card for this project, there are two
occurrences where the err variables are declared, but not used.

Signed-off-by: Sean Prashad <[email protected]>
  • Loading branch information
Sean authored and sagar committed Nov 2, 2018
1 parent e27e4e3 commit 12c844f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/udev/udev_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func TestNewUdevEnumerate(t *testing.T) {
t.Fatal(err)
}
devenu1.UnrefUdevEnumerate()
dev2, err := newUdev(nil)
dev2, _ := newUdev(nil)
if dev2 != nil {
t.Fatal("udev object should be nil for null pointer")
}
Expand All @@ -85,10 +85,9 @@ func TestNewDeviceFromSysPath(t *testing.T) {
if err != nil {
t.Fatal(err)
}
device2, err := udev.NewDeviceFromSysPath(diskDetails.SysPath)
device2, _ := udev.NewDeviceFromSysPath(diskDetails.SysPath)
if device2 != nil {
assert.Equal(t, diskDetails.SysPath, device2.GetSyspath())
defer device2.UdevDeviceUnref()
}

}

0 comments on commit 12c844f

Please sign in to comment.