Alex Henrie : ole32: Avoid calling RtlInitUnicodeString on a static constant.
Module: wine Branch: master Commit: da403f0b31636c8dbb8c73ad751cd650c9c14390 URL: https://gitlab.winehq.org/wine/wine/-/commit/da403f0b31636c8dbb8c73ad751cd65... Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Tue Feb 7 22:07:21 2023 -0700 ole32: Avoid calling RtlInitUnicodeString on a static constant. --- dlls/ole32/compobj.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c index 8d2591c1211..1eb5dc6e8f5 100644 --- a/dlls/ole32/compobj.c +++ b/dlls/ole32/compobj.c @@ -252,7 +252,7 @@ static HKEY create_classes_root_hkey(DWORD access) { HKEY hkey, ret = 0; OBJECT_ATTRIBUTES attr; - UNICODE_STRING name; + UNICODE_STRING name = RTL_CONSTANT_STRING(L"\\Registry\\Machine\\Software\\Classes"); attr.Length = sizeof(attr); attr.RootDirectory = 0; @@ -260,7 +260,6 @@ static HKEY create_classes_root_hkey(DWORD access) attr.Attributes = 0; attr.SecurityDescriptor = NULL; attr.SecurityQualityOfService = NULL; - RtlInitUnicodeString( &name, L"\\Registry\\Machine\\Software\\Classes" ); if (create_key( &hkey, access, &attr )) return 0; TRACE( "%s -> %p\n", debugstr_w(attr.ObjectName->Buffer), hkey );
participants (1)
-
Alexandre Julliard