Module: wine Branch: master Commit: 837b4aa429ea0b7200a56df4f5ed30286e26c75e URL: https://source.winehq.org/git/wine.git/?a=commit;h=837b4aa429ea0b7200a56df4f...
Author: Alex Henrie alexhenrie24@gmail.com Date: Fri Nov 30 00:14:19 2018 -0700
setupapi: Turn several constants and variables into static constants.
Signed-off-by: Alex Henrie alexhenrie24@gmail.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/setupapi/devinst.c | 6 +++--- dlls/setupapi/install.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/setupapi/devinst.c b/dlls/setupapi/devinst.c index ae7a575..b3d7099 100644 --- a/dlls/setupapi/devinst.c +++ b/dlls/setupapi/devinst.c @@ -259,7 +259,7 @@ static void SETUPDI_GuidToString(const GUID *guid, LPWSTR guidStr)
static WCHAR *get_iface_key_path(struct device_iface *iface) { - const WCHAR slashW[] = {'\',0}; + static const WCHAR slashW[] = {'\',0}; WCHAR *path, *ptr; size_t len = strlenW(DeviceClasses) + 1 + 38 + 1 + strlenW(iface->symlink);
@@ -286,8 +286,8 @@ static WCHAR *get_iface_key_path(struct device_iface *iface)
static WCHAR *get_refstr_key_path(struct device_iface *iface) { - const WCHAR hashW[] = {'#',0}; - const WCHAR slashW[] = {'\',0}; + static const WCHAR hashW[] = {'#',0}; + static const WCHAR slashW[] = {'\',0}; WCHAR *path, *ptr; size_t len = strlenW(DeviceClasses) + 1 + 38 + 1 + strlenW(iface->symlink) + 1 + 1;
diff --git a/dlls/setupapi/install.c b/dlls/setupapi/install.c index 1453f52..0abd716 100644 --- a/dlls/setupapi/install.c +++ b/dlls/setupapi/install.c @@ -1598,7 +1598,7 @@ BOOL WINAPI SetupGetInfFileListW(PCWSTR dir, DWORD style, PWSTR buffer, } else { - WCHAR infdir[] = {'\','i','n','f',0 }; + static const WCHAR infdir[] = {'\','i','n','f',0}; DWORD msize; dir_len = GetWindowsDirectoryW( NULL, 0 ); msize = ( 7 + 4 + dir_len ) * sizeof( WCHAR );