diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2009-07-03 16:50:03 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-07-14 10:05:54 +1000 |
commit | 2d35ea8d957a955e1200ba2b14424bddfe1f4148 (patch) | |
tree | f06b6093ff6289b60fcfe6ab5aa72a8eb4d1c0e7 /dix/dixfonts.c | |
parent | 7dd415aa6a3959f15276741db168ba264948ecfe (diff) |
dix: switch to byte-counting functions.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'dix/dixfonts.c')
-rw-r--r-- | dix/dixfonts.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/dix/dixfonts.c b/dix/dixfonts.c index 8b6e7a329..7d7ae71de 100644 --- a/dix/dixfonts.c +++ b/dix/dixfonts.c @@ -792,7 +792,7 @@ finish: memset(&reply, 0, sizeof(xListFontsReply)); reply.type = X_Reply; - reply.length = (stringLens + nnames + 3) >> 2; + reply.length = bytes_to_int32(stringLens + nnames); reply.nFonts = nnames; reply.sequenceNumber = client->sequence; @@ -817,7 +817,7 @@ finish: } } nnames = reply.nFonts; - reply.length = (stringLens + nnames + 3) >> 2; + reply.length = bytes_to_int32(stringLens + nnames); client->pSwapReplyFunc = ReplySwapVector[X_ListFonts]; WriteSwappedDataToClient(client, sizeof(xListFontsReply), &reply); (void) WriteToClient(client, stringLens + nnames, bufferStart); @@ -1057,9 +1057,9 @@ doListFontsWithInfo(ClientPtr client, LFWIclosurePtr c) namelen = strlen(name); } reply->type = X_Reply; - reply->length = (sizeof *reply - sizeof(xGenericReply) + + reply->length = bytes_to_int32(sizeof *reply - sizeof(xGenericReply) + pFontInfo->nprops * sizeof(xFontProp) + - namelen + 3) >> 2; + namelen); reply->sequenceNumber = client->sequence; reply->nameLength = namelen; reply->minBounds = pFontInfo->ink_minbounds; @@ -1097,8 +1097,8 @@ finish: bzero((char *) &finalReply, sizeof(xListFontsWithInfoReply)); finalReply.type = X_Reply; finalReply.sequenceNumber = client->sequence; - finalReply.length = (sizeof(xListFontsWithInfoReply) - - sizeof(xGenericReply)) >> 2; + finalReply.length = bytes_to_int32(sizeof(xListFontsWithInfoReply) + - sizeof(xGenericReply)); WriteSwappedDataToClient(client, length, &finalReply); bail: if (c->slept) |