From d83b5de64413905ea28ca756247a1f8b1308b5f8 Mon Sep 17 00:00:00 2001 From: Christophe CURIS Date: Sat, 29 Nov 2014 16:35:27 +0100 Subject: [PATCH] wmaker: remove unnecessary check in acceptXDND (Coverity #72817) As pointed by Coverity, if dock is still null at this point then the function will return via the previous check, because it is not possible to have icon_pos >= 0 if dock is null. This patch removes the check because it complicate the code which is not recommended for maintainability. Signed-off-by: Christophe CURIS --- src/xdnd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/xdnd.c b/src/xdnd.c index 2a73c4b2..afbbd44c 100644 --- a/src/xdnd.c +++ b/src/xdnd.c @@ -226,8 +226,7 @@ static Bool acceptXDND(Window window) } if (icon_pos < 0) return False; - if (!dock) - return False; + if (isAwareXDND(dock->icon_array[icon_pos]->icon->icon_win)) return False;