Module: wine Branch: master Commit: 3ab7d745fe3e7c85491218d927ef77bbd3a30c8c URL: https://gitlab.winehq.org/wine/wine/-/commit/3ab7d745fe3e7c85491218d927ef77b...
Author: Alex Henrie alexhenrie24@gmail.com Date: Fri Feb 3 23:01:08 2023 -0700
nsiproxy: Avoid calling RtlInitUnicodeString on a static constant.
---
dlls/nsiproxy.sys/device.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/dlls/nsiproxy.sys/device.c b/dlls/nsiproxy.sys/device.c index 4528e934991..87d634ff5c0 100644 --- a/dlls/nsiproxy.sys/device.c +++ b/dlls/nsiproxy.sys/device.c @@ -305,13 +305,11 @@ static NTSTATUS WINAPI nsi_ioctl( DEVICE_OBJECT *device, IRP *irp )
static int add_device( DRIVER_OBJECT *driver ) { - UNICODE_STRING name, link; + UNICODE_STRING name = RTL_CONSTANT_STRING( L"\Device\Nsi" ); + UNICODE_STRING link = RTL_CONSTANT_STRING( L"\??\Nsi" ); DEVICE_OBJECT *device; NTSTATUS status;
- RtlInitUnicodeString( &name, L"\Device\Nsi" ); - RtlInitUnicodeString( &link, L"\??\Nsi" ); - if (!(status = IoCreateDevice( driver, 0, &name, FILE_DEVICE_NETWORK, FILE_DEVICE_SECURE_OPEN, FALSE, &device ))) status = IoCreateSymbolicLink( &link, &name ); if (status)