From: Christophe CURIS <christophe.cu...@free.fr>

As pointed by Coverity, the variable 'dir' is passed by reference because
the function may update it; as it is never NULL (the function is local)
checking for that does not make sense. From the actual usage, it seems
logical that the check should have been on the value, not on the pointer.

Signed-off-by: Christophe CURIS <christophe.cu...@free.fr>
---
 WINGs/wtext.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/WINGs/wtext.c b/WINGs/wtext.c
index 495be70..c112fbe 100644
--- a/WINGs/wtext.c
+++ b/WINGs/wtext.c
@@ -581,7 +581,7 @@ static Bool updateStartForCurrentTextBlock(Text * tPtr, int 
x, int y, int *dir,
                        return 0;
 
                if (tb->graphic) {
-                       tPtr->currentTextBlock = (dir ? tPtr->lastTextBlock : 
tPtr->firstTextBlock);
+                       tPtr->currentTextBlock = (*dir ? tPtr->lastTextBlock : 
tPtr->firstTextBlock);
                        tPtr->tpos = 0;
                        return 0;
                }
-- 
1.9.2


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.

Reply via email to