[PATCH libXi] 1UL may be 4 bytes, force to 1ULL

Jamey Sharp jamey at minilop.net
Mon Sep 19 17:37:55 PDT 2011


I'm a bit skeptical... Would ldexp(frac, -32) work for you? Otherwise
I'd argue for (UINT64_C(1) << 32).

Jamey

On Tue, Sep 20, 2011 at 10:19:54AM +1000, Peter Hutterer wrote:
> Reported-by: Jeremy Huddleston <jeremyhu at apple.com>
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> ---
> something like this good enough?
> 
>  src/XExtInt.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/src/XExtInt.c b/src/XExtInt.c
> index d74a8d4..4009285 100644
> --- a/src/XExtInt.c
> +++ b/src/XExtInt.c
> @@ -1577,7 +1577,7 @@ copy_classes(XIDeviceInfo* to, xXIAnyInfo* from, int *nclasses)
>                      cls_lib->scroll_type= cls_wire->scroll_type;
>                      cls_lib->flags      = cls_wire->flags;
>                      cls_lib->increment  = cls_wire->increment.integral;
> -                    cls_lib->increment += (unsigned int)cls_wire->increment.frac/(double)(1UL << 32);
> +                    cls_lib->increment += (unsigned int)cls_wire->increment.frac/(double)(1ULL << 32);
>  
>                      to->classes[cls_idx++] = any_lib;
>                  }
> -- 
> 1.7.6
> 
> _______________________________________________
> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.x.org/archives/xorg-devel/attachments/20110919/0c4be819/attachment.pgp>


More information about the xorg-devel mailing list