Commit cd2002fd authored by Alex Henrie's avatar Alex Henrie Committed by Alexandre Julliard

httpapi: Avoid calling RtlInitUnicodeString on a static constant.

parent a6847dd9
......@@ -185,7 +185,7 @@ ULONG WINAPI HttpSetServiceConfiguration( HANDLE handle, HTTP_SERVICE_CONFIG_ID
ULONG WINAPI HttpCreateHttpHandle(HANDLE *handle, ULONG reserved)
{
OBJECT_ATTRIBUTES attr = {sizeof(attr)};
UNICODE_STRING string;
UNICODE_STRING string = RTL_CONSTANT_STRING(L"\\Device\\Http\\ReqQueue");
IO_STATUS_BLOCK iosb;
TRACE("handle %p, reserved %#lx.\n", handle, reserved);
......@@ -193,7 +193,6 @@ ULONG WINAPI HttpCreateHttpHandle(HANDLE *handle, ULONG reserved)
if (!handle)
return ERROR_INVALID_PARAMETER;
RtlInitUnicodeString(&string, L"\\Device\\Http\\ReqQueue");
attr.ObjectName = &string;
return RtlNtStatusToDosError(NtCreateFile(handle, 0, &attr, &iosb, NULL,
FILE_ATTRIBUTE_NORMAL, 0, FILE_OPEN, FILE_NON_DIRECTORY_FILE, NULL, 0));
......@@ -741,7 +740,7 @@ ULONG WINAPI HttpCreateRequestQueue(HTTPAPI_VERSION version, const WCHAR *name,
SECURITY_ATTRIBUTES *sa, ULONG flags, HANDLE *handle)
{
OBJECT_ATTRIBUTES attr = {sizeof(attr)};
UNICODE_STRING string;
UNICODE_STRING string = RTL_CONSTANT_STRING(L"\\Device\\Http\\ReqQueue");
IO_STATUS_BLOCK iosb;
TRACE("version %u.%u, name %s, sa %p, flags %#lx, handle %p.\n",
......@@ -753,7 +752,6 @@ ULONG WINAPI HttpCreateRequestQueue(HTTPAPI_VERSION version, const WCHAR *name,
if (flags)
FIXME("Unhandled flags %#lx.\n", flags);
RtlInitUnicodeString(&string, L"\\Device\\Http\\ReqQueue");
attr.ObjectName = &string;
if (sa && sa->bInheritHandle)
attr.Attributes |= OBJ_INHERIT;
......
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