diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2009-07-06 12:29:26 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-07-14 10:14:02 +1000 |
commit | 34bfaa9d9ecd90cfe8413bc275179fdcc193eab3 (patch) | |
tree | 7331954d2339aefefbdfc58a6315576e90728c2c /xfixes | |
parent | e216527107fda470b92b7e526f3db22465962a43 (diff) |
xfixes: switch to byte counting functions
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'xfixes')
-rw-r--r-- | xfixes/cursor.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xfixes/cursor.c b/xfixes/cursor.c index 534c82605..698e4d58f 100644 --- a/xfixes/cursor.c +++ b/xfixes/cursor.c @@ -488,7 +488,7 @@ ProcXFixesGetCursorName (ClientPtr client) len = strlen (str); reply.type = X_Reply; - reply.length = (len + 3) >> 2; + reply.length = bytes_to_int32(len); reply.sequenceNumber = client->sequence; reply.atom = pCursor->name; reply.nbytes = len; @@ -545,7 +545,7 @@ ProcXFixesGetCursorImageAndName (ClientPtr client) npixels = width * height; name = pCursor->name ? NameForAtom (pCursor->name) : ""; nbytes = strlen (name); - nbytesRound = (nbytes + 3) & ~3; + nbytesRound = pad_to_int32(nbytes); rep = xalloc (sizeof (xXFixesGetCursorImageAndNameReply) + npixels * sizeof (CARD32) + nbytesRound); if (!rep) @@ -553,7 +553,7 @@ ProcXFixesGetCursorImageAndName (ClientPtr client) rep->type = X_Reply; rep->sequenceNumber = client->sequence; - rep->length = npixels + (nbytesRound >> 2); + rep->length = npixels + bytes_to_int32(nbytesRound); rep->width = width; rep->height = height; rep->x = x; |