pkg/system/windows: remove unnecessary conversions

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2019-11-25 13:35:00 +01:00
parent 4cdb796b54
commit 33d8492ce4
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -99,7 +99,7 @@ func IsWindowsClient() bool {
// Unmount is a platform-specific helper function to call
// the unmount syscall. Not supported on Windows
func Unmount(dest string) error {
func Unmount(_ string) error {
return nil
}
@ -120,7 +120,7 @@ func CommandLineToArgv(commandLine string) ([]string, error) {
newArgs := make([]string, argc)
for i, v := range (*argv)[:argc] {
newArgs[i] = string(windows.UTF16ToString((*v)[:]))
newArgs[i] = windows.UTF16ToString((*v)[:])
}
return newArgs, nil
@ -147,7 +147,7 @@ func GetSecurityDescriptorDacl(securityDescriptor *byte, daclPresent *uint32, da
r1, _, e1 := syscall.Syscall6(procGetSecurityDescriptorDacl.Addr(), 4, uintptr(unsafe.Pointer(securityDescriptor)), uintptr(unsafe.Pointer(daclPresent)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(daclDefaulted)), 0, 0)
if r1 == 0 {
if e1 != 0 {
result = syscall.Errno(e1)
result = e1
} else {
result = syscall.EINVAL
}