summaryrefslogtreecommitdiff
path: root/hw/xfree86/dri/xf86dri.c
diff options
context:
space:
mode:
authorJoel Bosveld <joel.bosveld@gmail.com>2009-09-08 23:06:00 +0800
committerJoel Bosveld <joel.bosveld@gmail.com>2009-09-08 23:55:13 +0800
commit1ba17340a98a34b40f78442963aa4132e6cfae5c (patch)
treed11d814844e4ad037d146133250b73f28cdb3e31 /hw/xfree86/dri/xf86dri.c
parent5e38708c3466129c3e5af40a915c044bb26e083f (diff)
parent1bdc9ec617d357b076c9e69296018bc212d91c7d (diff)
Merge branch 'upstream' (one day I will rebase rather than merge)HEADmaster
Conflicts: test/Makefile.am
Diffstat (limited to 'hw/xfree86/dri/xf86dri.c')
-rw-r--r--hw/xfree86/dri/xf86dri.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/hw/xfree86/dri/xf86dri.c b/hw/xfree86/dri/xf86dri.c
index 902fe1264..d3e5e688a 100644
--- a/hw/xfree86/dri/xf86dri.c
+++ b/hw/xfree86/dri/xf86dri.c
@@ -214,8 +214,8 @@ ProcXF86DRIOpenConnection(
rep.busIdStringLength = 0;
if (busIdString)
rep.busIdStringLength = strlen(busIdString);
- rep.length = (SIZEOF(xXF86DRIOpenConnectionReply) - SIZEOF(xGenericReply) +
- ((rep.busIdStringLength + 3) & ~3)) >> 2;
+ rep.length = bytes_to_int32(SIZEOF(xXF86DRIOpenConnectionReply) - SIZEOF(xGenericReply) +
+ pad_to_int32(rep.busIdStringLength));
rep.hSAREALow = (CARD32)(hSAREA & 0xffffffff);
#if defined(LONG64) && !defined(__linux__)
@@ -300,9 +300,9 @@ ProcXF86DRIGetClientDriverName(
rep.clientDriverNameLength = 0;
if (clientDriverName)
rep.clientDriverNameLength = strlen(clientDriverName);
- rep.length = (SIZEOF(xXF86DRIGetClientDriverNameReply) -
+ rep.length = bytes_to_int32(SIZEOF(xXF86DRIGetClientDriverNameReply) -
SIZEOF(xGenericReply) +
- ((rep.clientDriverNameLength + 3) & ~3)) >> 2;
+ pad_to_int32(rep.clientDriverNameLength));
WriteToClient(client,
sizeof(xXF86DRIGetClientDriverNameReply), (char *)&rep);
@@ -515,7 +515,7 @@ ProcXF86DRIGetDrawableInfo(
rep.length += sizeof(drm_clip_rect_t) * rep.numClipRects;
}
- rep.length = ((rep.length + 3) & ~3) >> 2;
+ rep.length = bytes_to_int32(rep.length);
WriteToClient(client, sizeof(xXF86DRIGetDrawableInfoReply), (char *)&rep);
@@ -574,9 +574,9 @@ ProcXF86DRIGetDeviceInfo(
rep.length = 0;
if (rep.devPrivateSize) {
- rep.length = (SIZEOF(xXF86DRIGetDeviceInfoReply) -
+ rep.length = bytes_to_int32(SIZEOF(xXF86DRIGetDeviceInfoReply) -
SIZEOF(xGenericReply) +
- ((rep.devPrivateSize + 3) & ~3)) >> 2;
+ pad_to_int32(rep.devPrivateSize));
}
WriteToClient(client, sizeof(xXF86DRIGetDeviceInfoReply), (char *)&rep);