dix: switch to byte-counting functions.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2009-07-03 16:50:03 +10:00
commit 2d35ea8d95
9 changed files with 54 additions and 53 deletions

View file

@ -731,7 +731,7 @@ SLHostsExtend(ClientPtr pClient, int size, char *buf)
int len = host->length;
char n;
swaps (&host->length, n);
bufT += sizeof (xHostEntry) + (((len + 3) >> 2) << 2);
bufT += sizeof (xHostEntry) + pad_to_int32(len);
}
(void)WriteToClient (pClient, size, buf);
}
@ -1222,7 +1222,7 @@ SwapConnSetupInfo(
pInfoT += sizeof(xConnSetup);
/* Copy the vendor string */
i = (pConnSetup->nbytesVendor + 3) & ~3;
i = pad_to_int32(pConnSetup->nbytesVendor);
memcpy(pInfoT, pInfo, i);
pInfo += i;
pInfoT += i;