WINGs: fix incorrect usage of direction variable in updateStartForCurrentTextBlock (Coverity #50192)

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.curis@free.fr>
This commit is contained in:
Christophe CURIS authored and Carlos R. Mafra committed 2014-05-18 23:01:43 +01:00
1 parent 21c891e669
commit e65f527ad4
1 file changed
+1 -1
+1 -1
View File
@@ -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;
}