Module: wine Branch: master Commit: 8630a0c84d7d74a433685538f91c299d2125c765 URL: https://gitlab.winehq.org/wine/wine/-/commit/8630a0c84d7d74a433685538f91c299...
Author: Alex Henrie alexhenrie24@gmail.com Date: Sat Feb 11 12:54:07 2023 -0700
ws2_32: Avoid calling RtlInitUnicodeString on a static constant.
---
dlls/ws2_32/socket.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 2a8fcf01ed8..5eb926a408b 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -3823,7 +3823,7 @@ SOCKET WINAPI WSASocketW(int af, int type, int protocol, { struct afd_create_params create_params; OBJECT_ATTRIBUTES attr; - UNICODE_STRING string; + UNICODE_STRING string = RTL_CONSTANT_STRING(L"\Device\Afd"); IO_STATUS_BLOCK io; NTSTATUS status; HANDLE handle; @@ -3901,7 +3901,6 @@ SOCKET WINAPI WSASocketW(int af, int type, int protocol, } }
- RtlInitUnicodeString(&string, L"\Device\Afd"); InitializeObjectAttributes(&attr, &string, (flags & WSA_FLAG_NO_HANDLE_INHERIT) ? 0 : OBJ_INHERIT, NULL, NULL); if ((status = NtOpenFile(&handle, GENERIC_READ | GENERIC_WRITE | SYNCHRONIZE, &attr, &io, 0, (flags & WSA_FLAG_OVERLAPPED) ? 0 : FILE_SYNCHRONOUS_IO_NONALERT)))