[PATCH] browseui: Have a single empty wide string at the top of progressdlg.c

Alex Henrie alexhenrie24 at gmail.com
Fri Nov 30 01:14:00 CST 2018


Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
---
 dlls/browseui/progressdlg.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/dlls/browseui/progressdlg.c b/dlls/browseui/progressdlg.c
index e10d8bd5ac..61078a1d71 100644
--- a/dlls/browseui/progressdlg.c
+++ b/dlls/browseui/progressdlg.c
@@ -89,9 +89,10 @@ static inline ProgressDialog *impl_from_IOleWindow(IOleWindow *iface)
     return CONTAINING_RECORD(iface, ProgressDialog, IOleWindow_iface);
 }
 
+static const WCHAR empty_string[] = {0};
+
 static void set_buffer(LPWSTR *buffer, LPCWSTR string)
 {
-    static const WCHAR empty_string[] = {0};
     IMalloc *malloc;
     ULONG cb;
 
@@ -132,15 +133,13 @@ static void set_progress_marquee(ProgressDialog *This)
 
 static void update_dialog(ProgressDialog *This, DWORD dwUpdate)
 {
-    WCHAR empty[] = {0};
-
     if (dwUpdate & UPDATE_TITLE)
         SetWindowTextW(This->hwnd, This->title);
 
     if (dwUpdate & UPDATE_LINE1)
-        SetDlgItemTextW(This->hwnd, IDC_TEXT_LINE, (This->isCancelled ? empty : This->lines[0]));
+        SetDlgItemTextW(This->hwnd, IDC_TEXT_LINE, (This->isCancelled ? empty_string : This->lines[0]));
     if (dwUpdate & UPDATE_LINE2)
-        SetDlgItemTextW(This->hwnd, IDC_TEXT_LINE+1, (This->isCancelled ? empty : This->lines[1]));
+        SetDlgItemTextW(This->hwnd, IDC_TEXT_LINE+1, (This->isCancelled ? empty_string : This->lines[1]));
     if (dwUpdate & UPDATE_LINE3)
         SetDlgItemTextW(This->hwnd, IDC_TEXT_LINE+2, (This->isCancelled ? This->cancelMsg : This->lines[2]));
 
-- 
2.19.2




More information about the wine-devel mailing list