Alistair Leslie-Hughes : odbccp32: Remove duplicate string.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Nov 13 08:34:46 CST 2015


Module: wine
Branch: master
Commit: d77423093cad30de0363a993a36c965e3099b23e
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=d77423093cad30de0363a993a36c965e3099b23e

Author: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date:   Fri Nov 13 17:49:49 2015 +1100

odbccp32: Remove duplicate string.

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/odbccp32/odbccp32.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/dlls/odbccp32/odbccp32.c b/dlls/odbccp32/odbccp32.c
index 7aac6dd..bc643d4 100644
--- a/dlls/odbccp32/odbccp32.c
+++ b/dlls/odbccp32/odbccp32.c
@@ -37,6 +37,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(odbc);
 
 /* Registry key names */
 static const WCHAR drivers_key[] = {'S','o','f','t','w','a','r','e','\\','O','D','B','C','\\','O','D','B','C','I','N','S','T','.','I','N','I','\\','O','D','B','C',' ','D','r','i','v','e','r','s',0};
+static const WCHAR odbcW[] = {'S','o','f','t','w','a','r','e','\\','O','D','B','C',0};
 
 /* This config mode is known to be process-wide.
  * MSDN documentation suggests that the value is hidden somewhere in the registry but I haven't found it yet.
@@ -401,7 +402,6 @@ BOOL WINAPI SQLGetInstalledDrivers(LPSTR lpszBuf, WORD cbBufMax,
 
 static HKEY get_privateprofile_sectionkey(LPCWSTR section, LPCWSTR filename)
 {
-    static const WCHAR odbcW[] = {'S','o','f','t','w','a','r','e','\\','O','D','B','C','\\',0};
     HKEY hkey, hkeyfilename, hkeysection;
     LONG ret;
 
@@ -1165,7 +1165,6 @@ BOOL WINAPI SQLWritePrivateProfileStringW(LPCWSTR lpszSection, LPCWSTR lpszEntry
 {
     LONG ret;
     HKEY hkey;
-    WCHAR softwareodbc[] = {'S','o','f','t','w','a','r','e','\\','O','D','B','C',0};
 
     clear_errors();
     TRACE("%s %s %s %s\n", debugstr_w(lpszSection), debugstr_w(lpszEntry),
@@ -1177,7 +1176,7 @@ BOOL WINAPI SQLWritePrivateProfileStringW(LPCWSTR lpszSection, LPCWSTR lpszEntry
         return FALSE;
     }
 
-    if ((ret = RegCreateKeyW(HKEY_CURRENT_USER, softwareodbc, &hkey)) == ERROR_SUCCESS)
+    if ((ret = RegCreateKeyW(HKEY_CURRENT_USER, odbcW, &hkey)) == ERROR_SUCCESS)
     {
          HKEY hkeyfilename;
 




More information about the wine-cvs mailing list