Remove redundant condition
authorIlya Shipitsin <chipitsine@gmail.com>
Tue, 31 Jan 2017 09:10:58 +0000 (14:10 +0500)
committerIlya Shipitsin <chipitsine@gmail.com>
Tue, 31 Jan 2017 09:10:58 +0000 (14:10 +0500)
[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

index ba96483..c9d4ea7 100644 (file)
@@ -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);
                        }
                }
        }