From 34bfaa9d9ecd90cfe8413bc275179fdcc193eab3 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 6 Jul 2009 12:29:26 +1000 Subject: xfixes: switch to byte counting functions Signed-off-by: Peter Hutterer --- xfixes/cursor.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xfixes') 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; -- cgit v1.2.3