]> Cypherpunks repositories - gostls13.git/commit
syscall, internal/syscall/windows: remove utf16PtrToString parameter
authorAlex Brainman <alex.brainman@gmail.com>
Sun, 19 Apr 2020 07:08:58 +0000 (17:08 +1000)
committerAlex Brainman <alex.brainman@gmail.com>
Sun, 3 May 2020 07:23:32 +0000 (07:23 +0000)
commit53f27474a455a4a82e8c0f8ef4cee9a37b51ff98
tree8bc3196d331f38ba3e988725201145fbe0aacea9
parente90b0ce68b12a75732f28b6672d4c48ca73eaffe
syscall, internal/syscall/windows: remove utf16PtrToString parameter

CL 208617 introduced syscall.utf16PtrToString and
internal/syscall/windows.UTF16PtrToString functions.

Original version of CL 208617 did not include syscall.utf16PtrToString
and internal/syscall/windows.UTF16PtrToString max parameter. The
parameter was added by Brad at the request of Ian. Ian said:

"In some cases it seems at least possible that the null terminator is
not present. I think it would be safer if we passed a maximum length
here."

The syscall.utf16PtrToString and
internal/syscall/windows.UTF16PtrToString function are designed to work
with only null terminated strings. So max parameter is superfluous.

This change removes max parameter.

Updates #34972

Change-Id: Ifea65dbd86bca8a08353579c6b9636c6f963d165
Reviewed-on: https://go-review.googlesource.com/c/go/+/228858
Run-TryBot: Alex Brainman <alex.brainman@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
src/go/build/deps_test.go
src/internal/syscall/windows/syscall_windows.go
src/net/interface_windows.go
src/net/lookup_windows.go
src/os/exec_windows.go
src/os/user/lookup_windows.go
src/syscall/security_windows.go
src/syscall/syscall_windows.go