Michael Stefaniuc : msi: Use a string literal for empty strings.

Alexandre Julliard julliard at winehq.org
Thu Dec 3 15:35:58 CST 2020


Module: wine
Branch: master
Commit: 17c745a9d253b888366831ce4b9e695297f0dac2
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=17c745a9d253b888366831ce4b9e695297f0dac2

Author: Michael Stefaniuc <mstefani at winehq.org>
Date:   Thu Dec  3 00:32:52 2020 +0100

msi: Use a string literal for empty strings.

Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/msi/action.c     | 6 +++---
 dlls/msi/automation.c | 2 +-
 dlls/msi/msi.c        | 4 ++--
 dlls/msi/source.c     | 2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index ed1d0c8ffcc..cc5d56fdc2b 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -1269,7 +1269,7 @@ static UINT load_folder_persistence( MSIPACKAGE *package, MSIFOLDER *folder )
 static UINT load_folder( MSIRECORD *row, LPVOID param )
 {
     MSIPACKAGE *package = param;
-    static WCHAR szEmpty[] = {0};
+    static WCHAR szEmpty[] = L"";
     LPWSTR p, tgt_short, tgt_long, src_short, src_long;
     MSIFOLDER *folder;
 
@@ -5240,14 +5240,14 @@ static UINT ACTION_RegisterUser(MSIPACKAGE *package)
         L"ProductID",
         L"USERNAME",
         L"COMPANYNAME",
-        {0},
+        L"",
     };
     static const WCHAR szRegKeys[][80] =
     {
         L"ProductID",
         L"RegOwner",
         L"RegCompany",
-        {0},
+        L"",
     };
     HKEY hkey = 0;
     LPWSTR buffer, productid = NULL;
diff --git a/dlls/msi/automation.c b/dlls/msi/automation.c
index dc38436e682..80d6b8a66ba 100644
--- a/dlls/msi/automation.c
+++ b/dlls/msi/automation.c
@@ -781,7 +781,7 @@ static HRESULT summaryinfo_invoke(
                 DATE date;
                 LPWSTR str;
 
-                static WCHAR szEmpty[] = {0};
+                static WCHAR szEmpty[] = L"";
 
                 hr = DispGetParam(pDispParams, 0, VT_I4, &varg0, puArgErr);
                 if (FAILED(hr)) return hr;
diff --git a/dlls/msi/msi.c b/dlls/msi/msi.c
index 0963c814211..c4c787da4e4 100644
--- a/dlls/msi/msi.c
+++ b/dlls/msi/msi.c
@@ -324,7 +324,7 @@ static UINT get_patch_product_codes( LPCWSTR szPatchPackage, WCHAR ***product_co
     MSIHANDLE patch, info = 0;
     UINT r, type;
     DWORD size;
-    static WCHAR empty[] = {0};
+    static WCHAR empty[] = L"";
     WCHAR *codes = NULL;
 
     r = MsiOpenDatabaseW( szPatchPackage, MSIDBOPEN_READONLY, &patch );
@@ -1096,7 +1096,7 @@ static WCHAR *reg_get_value( HKEY hkey, const WCHAR *name, DWORD *type )
 static UINT MSI_GetProductInfo(LPCWSTR szProduct, LPCWSTR szAttribute,
                                awstring *szValue, LPDWORD pcchValueBuf)
 {
-    static WCHAR empty[] = {0};
+    static WCHAR empty[] = L"";
     MSIINSTALLCONTEXT context = MSIINSTALLCONTEXT_USERUNMANAGED;
     UINT r = ERROR_UNKNOWN_PROPERTY;
     HKEY prodkey, userdata, source;
diff --git a/dlls/msi/source.c b/dlls/msi/source.c
index b4b3b54fe35..0eed436774a 100644
--- a/dlls/msi/source.c
+++ b/dlls/msi/source.c
@@ -585,7 +585,7 @@ UINT WINAPI MsiSourceListGetInfoW( LPCWSTR szProduct, LPCWSTR szUserSid,
                               0, 0, NULL, &size);
         if (rc != ERROR_SUCCESS)
         {
-            static WCHAR szEmpty[] = {0};
+            static WCHAR szEmpty[] = L"";
             rc = ERROR_SUCCESS;
             source = NULL;
             ptr = szEmpty;




More information about the wine-cvs mailing list