Remove variable hdc which is not really used from OnPaint.

Gerald Pfeifer gerald at pfeifer.com
Sat May 1 09:36:49 CDT 2010


If I have my Windows APIs right from twentythree years ago, alternately
we could also pass hdc as the first parameter of FillRect (and error
handling, i.e. checking the result from BeginPaint for NULL-ness is not 
commonly done), thus this patch.

Gerald


---
 programs/regedit/childwnd.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/programs/regedit/childwnd.c b/programs/regedit/childwnd.c
index 1e7171a..bb56cb2 100644
--- a/programs/regedit/childwnd.c
+++ b/programs/regedit/childwnd.c
@@ -94,10 +94,9 @@ static void OnPaint(HWND hWnd)
 {
     PAINTSTRUCT ps;
     RECT rt;
-    HDC hdc;
 
     GetClientRect(hWnd, &rt);
-    hdc = BeginPaint(hWnd, &ps);
+    BeginPaint(hWnd, &ps);
     FillRect(ps.hdc, &rt, GetSysColorBrush(COLOR_BTNFACE));
     EndPaint(hWnd, &ps);
 }
-- 
1.6.6.2



More information about the wine-patches mailing list