[PATCH:libXaw] Fix abs() usage.

Thomas Klausner wiz at NetBSD.org
Tue Mar 18 14:53:05 PDT 2014


For long arguments, use labs().
>From Jörg Sonnenberger <joerg at NetBSD.org>

Signed-off-by: Thomas Klausner <wiz at NetBSD.org>
---
 src/Text.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Text.c b/src/Text.c
index a1ae74a..8100122 100644
--- a/src/Text.c
+++ b/src/Text.c
@@ -2837,7 +2837,7 @@ DoSelection(TextWidget ctx, XawTextPosition pos, Time time, Bool motion)
     if (motion)
 	newType = ctx->text.s.type;
     else {
-	if ((abs((long) time - (long) ctx->text.lasttime) < MULTI_CLICK_TIME)
+	if ((labs((long) time - (long) ctx->text.lasttime) < MULTI_CLICK_TIME)
 	    && (pos >= ctx->text.s.left && pos <= ctx->text.s.right)) {
 	    sarray = ctx->text.sarray;
 	    for (; *sarray != XawselectNull && *sarray != ctx->text.s.type;
-- 
1.9.0



More information about the xorg-devel mailing list