mirror of
https://github.com/rclone/rclone.git
synced 2025-08-18 01:20:16 +02:00
Fix lint issues reported by staticcheck
Used staticcheck 2022.1.2 (v0.3.2) See: staticcheck.io
This commit is contained in:
@@ -17,10 +17,7 @@ func TestWriteFileDoubleClose(t *testing.T) {
|
||||
|
||||
// writeTestDup performs the platform-specific implementation of the dup() syscall
|
||||
func writeTestDup(oldfd uintptr) (uintptr, error) {
|
||||
p, err := windows.GetCurrentProcess()
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
p := windows.CurrentProcess()
|
||||
var h windows.Handle
|
||||
return uintptr(h), windows.DuplicateHandle(p, windows.Handle(oldfd), p, &h, 0, true, windows.DUPLICATE_SAME_ACCESS)
|
||||
}
|
||||
|
Reference in New Issue
Block a user