Commit 3ab7d745 authored by Alex Henrie's avatar Alex Henrie Committed by Alexandre Julliard

nsiproxy: Avoid calling RtlInitUnicodeString on a static constant.

parent 5a1d2dde
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment