Module: wine Branch: master Commit: 4a3065c5d72bae0e62da0e391bff9c2d9717d366 URL: http://source.winehq.org/git/wine.git/?a=commit;h=4a3065c5d72bae0e62da0e391b...
Author: Alex Henrie alexhenrie24@gmail.com Date: Thu Nov 5 21:00:40 2015 -0700
user32: Turn magic values into static constants.
Signed-off-by: Alex Henrie alexhenrie24@gmail.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/user32/button.c | 2 +- dlls/user32/edit.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/user32/button.c b/dlls/user32/button.c index db479a8..890d154 100644 --- a/dlls/user32/button.c +++ b/dlls/user32/button.c @@ -201,7 +201,7 @@ static inline void paint_button( HWND hwnd, LONG style, UINT action ) /* retrieve the button text; returned buffer must be freed by caller */ static inline WCHAR *get_button_text( HWND hwnd ) { - INT len = 512; + static const INT len = 512; WCHAR *buffer = HeapAlloc( GetProcessHeap(), 0, (len + 1) * sizeof(WCHAR) ); if (buffer) InternalGetWindowText( hwnd, buffer, len + 1 ); return buffer; diff --git a/dlls/user32/edit.c b/dlls/user32/edit.c index dfd72e8..4570073 100644 --- a/dlls/user32/edit.c +++ b/dlls/user32/edit.c @@ -2883,7 +2883,7 @@ static void EDIT_EM_SetLimitText(EDITSTATE *es, UINT limit) */ static int calc_min_set_margin_size(HDC dc, INT left, INT right) { - WCHAR magic_string[] = {''','*','*',''', 0}; + static const WCHAR magic_string[] = {''','*','*',''', 0}; SIZE sz;
GetTextExtentPointW(dc, magic_string, sizeof(magic_string)/sizeof(WCHAR) - 1, &sz);