[PATCH 08/18] xquartz: switch to byte counting functions

Peter Hutterer peter.hutterer at who-t.net
Wed Jul 8 17:05:06 PDT 2009


Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 hw/xquartz/pseudoramiX.c   |    2 +-
 hw/xquartz/xpr/xprCursor.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/xquartz/pseudoramiX.c b/hw/xquartz/pseudoramiX.c
index f4ceff3..503b2cc 100644
--- a/hw/xquartz/pseudoramiX.c
+++ b/hw/xquartz/pseudoramiX.c
@@ -307,7 +307,7 @@ static int ProcPseudoramiXQueryScreens(ClientPtr client)
     rep.type = X_Reply;
     rep.sequenceNumber = client->sequence;
     rep.number = noPseudoramiXExtension ? 0 : pseudoramiXNumScreens;
-    rep.length = rep.number * sz_XineramaScreenInfo >> 2;
+    rep.length = num_dwords_for_bytes(rep.number * sz_XineramaScreenInfo);
     if (client->swapped) {
 	register int n;
 	swaps (&rep.sequenceNumber, n);
diff --git a/hw/xquartz/xpr/xprCursor.c b/hw/xquartz/xpr/xprCursor.c
index 4345bee..565657d 100644
--- a/hw/xquartz/xpr/xprCursor.c
+++ b/hw/xquartz/xpr/xprCursor.c
@@ -128,7 +128,7 @@ load_cursor(CursorPtr src, int screen)
 
             while (ycount-- > 0)
             {
-                xcount = (src->bits->width + 7) / 8;
+                xcount = num_bytes_for_bits(src->bits->width);
                 sptr = srow; mptr = mrow;
                 dptr = drow;
 
-- 
1.6.3.rc1.2.g0164.dirty



More information about the xorg-devel mailing list