From e39ac14069ee47a95bc50a7e912f79d275800bae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Mon, 2 Oct 2023 20:18:08 +0200 Subject: [PATCH] [SETUPAPI] Use wide character string literals in ReactOS-specific code too. --- dll/win32/setupapi/queue.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/dll/win32/setupapi/queue.c b/dll/win32/setupapi/queue.c index ea5c0813e4e..3b3b8355bc5 100644 --- a/dll/win32/setupapi/queue.c +++ b/dll/win32/setupapi/queue.c @@ -25,11 +25,6 @@ #include #endif -/* Unicode constants */ -#ifdef __REACTOS__ -static const WCHAR DotSecurity[] = {'.','S','e','c','u','r','i','t','y',0}; -#endif - /* context structure for the default queue callback */ struct default_callback_context { @@ -292,18 +287,13 @@ UINT CALLBACK QUEUE_callback_WtoA( void *context, UINT notification, */ static void get_src_file_info( HINF hinf, struct file_op *op, PWSTR* psrc_root, PWSTR* psrc_descr, PWSTR* psrc_tag) { - static const WCHAR SourceDisksNames[] = - {'S','o','u','r','c','e','D','i','s','k','s','N','a','m','e','s',0}; - static const WCHAR SourceDisksFiles[] = - {'S','o','u','r','c','e','D','i','s','k','s','F','i','l','e','s',0}; - INFCONTEXT file_ctx, disk_ctx; INT id, diskid; DWORD len, len2; WCHAR SectionName[MAX_PATH]; /* find the SourceDisksFiles entry */ - if(!SetupDiGetActualSectionToInstallW(hinf, SourceDisksFiles, SectionName, ARRAY_SIZE(SectionName), NULL, NULL)) + if(!SetupDiGetActualSectionToInstallW(hinf, L"SourceDisksFiles", SectionName, ARRAY_SIZE(SectionName), NULL, NULL)) return; if (!SetupFindFirstLineW( hinf, SectionName, op->src_file, &file_ctx )) { @@ -315,7 +305,7 @@ static void get_src_file_info( HINF hinf, struct file_op *op, PWSTR* psrc_root, if (!SetupGetIntField( &file_ctx, 1, &diskid )) return; /* now find the diskid in the SourceDisksNames section */ - if(!SetupDiGetActualSectionToInstallW(hinf, SourceDisksNames, SectionName, ARRAY_SIZE(SectionName), NULL, NULL)) + if(!SetupDiGetActualSectionToInstallW(hinf, L"SourceDisksNames", SectionName, ARRAY_SIZE(SectionName), NULL, NULL)) return; if (!SetupFindFirstLineW( hinf, SectionName, NULL, &disk_ctx )) return; for (;;) @@ -922,14 +912,14 @@ BOOL WINAPI SetupQueueCopySectionW( HSPFILEQ queue, PCWSTR src_root, HINF hinf, #ifdef __REACTOS__ /* Check for .Security section */ - security_key = MyMalloc( (lstrlenW( section ) + lstrlenW( DotSecurity )) * sizeof(WCHAR) + sizeof(UNICODE_NULL) ); + security_key = MyMalloc( (lstrlenW( section ) + lstrlenW( L".Security" )) * sizeof(WCHAR) + sizeof(UNICODE_NULL) ); if (!security_key) { SetLastError(ERROR_NOT_ENOUGH_MEMORY); return FALSE; } lstrcpyW( security_key, section ); - lstrcatW( security_key, DotSecurity ); + lstrcatW( security_key, L".Security" ); ret = SetupFindFirstLineW( hinf, security_key, NULL, &security_context ); MyFree(security_key); if (ret)