1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-30 18:32:34 +01:00

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
2014-05-18 21:31:49 +02:00
committed by Carlos R. Mafra
parent 21c891e669
commit e65f527ad4

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;
}