From 0a3bd2af4d74cc2015f04564e9094076f36f7030 Mon Sep 17 00:00:00 2001 From: Ilya Shipitsin Date: Tue, 31 Jan 2017 14:10:58 +0500 Subject: [PATCH] Remove redundant condition [client/X11/xf_rail.c:205] -> [client/X11/xf_rail.c:220]: (warning) Either the condition 'if(appWindow)' is redundant or there is possible null pointer dereference: appWindow. [client/X11/xf_rail.c:206] -> [client/X11/xf_rail.c:220]: (warning) Either the condition 'if(appWindow)' is redundant or there is possible null pointer dereference: appWindow. [client/X11/xf_rail.c:207] -> [client/X11/xf_rail.c:220]: (warning) Either the condition 'if(appWindow)' is redundant or there is possible null pointer dereference: appWindow. [client/X11/xf_rail.c:208] -> [client/X11/xf_rail.c:220]: (warning) Either the condition 'if(appWindow)' is redundant or there is possible null pointer dereference: appWindow. [client/X11/xf_rail.c:215] -> [client/X11/xf_rail.c:220]: (warning) Either the condition 'if(appWindow)' is redundant or there is possible null pointer dereference: appWindow. [client/X11/xf_rail.c:216] -> [client/X11/xf_rail.c:220]: (warning) Either the condition 'if(appWindow)' is redundant or there is possible null pointer dereference: appWindow. [client/X11/xf_rail.c:217] -> [client/X11/xf_rail.c:220]: (warning) Either the condition 'if(appWindow)' is redundant or there is possible null pointer dereference: appWindow. [client/X11/xf_rail.c:218] -> [client/X11/xf_rail.c:220]: (warning) Either the condition 'if(appWindow)' is redundant or there is possible null pointer dereference: appWindow. --- client/X11/xf_rail.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/client/X11/xf_rail.c b/client/X11/xf_rail.c index ba96483..c9d4ea7 100644 --- a/client/X11/xf_rail.c +++ b/client/X11/xf_rail.c @@ -217,12 +217,9 @@ void xf_rail_invalidate_region(xfContext* xfc, REGION16* invalidRegion) updateRect.right = extents->right - appWindow->x; updateRect.bottom = extents->bottom - appWindow->y; - if (appWindow) - { - xf_UpdateWindowArea(xfc, appWindow, updateRect.left, updateRect.top, - updateRect.right - updateRect.left, - updateRect.bottom - updateRect.top); - } + xf_UpdateWindowArea(xfc, appWindow, updateRect.left, updateRect.top, + updateRect.right - updateRect.left, + updateRect.bottom - updateRect.top); } } } -- 2.7.4