From be8870d5ea54865ba24a222cd5eec0d548b780cc Mon Sep 17 00:00:00 2001 From: Alex Henrie Date: Fri, 30 Nov 2018 00:14:00 -0700 Subject: [PATCH] browseui: Have a single empty wide string at the top of progressdlg.c. Signed-off-by: Alex Henrie Signed-off-by: Alexandre Julliard --- 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 e10d8bd5ac4..61078a1d711 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]));