mirror of
https://github.com/gryf/wmaker.git
synced 2026-10-06 09:20:34 +02: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:
1 parent
21c891e669
commit
e65f527ad4
1 file changed
+1
-1
+1
-1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user