[PATCH:libXaw] Fix abs() usage.

Thomas Klausner wiz at NetBSD.org
Wed Jul 16 09:44:33 PDT 2014


Review please!

Thanks,
 Thomas

On Wed, Mar 19, 2014 at 08:52:46AM +0100, Thomas Klausner wrote:
> From: Jörg Sonnenberger <joerg at NetBSD.org>
> 
> For long arguments, use labs().
> 
> 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
> 
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel


More information about the xorg-devel mailing list