aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/dri/xf86dri.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-09-06 18:48:27 +0000
committermarha <marha@users.sourceforge.net>2009-09-06 18:48:27 +0000
commita915739887477b28d924ecc8417ee107d125bd6c (patch)
treec02f315476b61892d1fd89182e18943dce8d6277 /xorg-server/hw/xfree86/dri/xf86dri.c
parent6f25a23db1df27e992c34f6fd4c82e83c44fc2e2 (diff)
downloadvcxsrv-a915739887477b28d924ecc8417ee107d125bd6c.tar.gz
vcxsrv-a915739887477b28d924ecc8417ee107d125bd6c.tar.bz2
vcxsrv-a915739887477b28d924ecc8417ee107d125bd6c.zip
Switched to xorg-server-1.6.99.900.tar.gz
Diffstat (limited to 'xorg-server/hw/xfree86/dri/xf86dri.c')
-rw-r--r--xorg-server/hw/xfree86/dri/xf86dri.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/xorg-server/hw/xfree86/dri/xf86dri.c b/xorg-server/hw/xfree86/dri/xf86dri.c
index ea11b38ee..d3e5e688a 100644
--- a/xorg-server/hw/xfree86/dri/xf86dri.c
+++ b/xorg-server/hw/xfree86/dri/xf86dri.c
@@ -42,8 +42,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "xf86.h"
-#define NEED_REPLIES
-#define NEED_EVENTS
#include <X11/X.h>
#include <X11/Xproto.h>
#include "misc.h"
@@ -216,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__)
@@ -302,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);
@@ -408,8 +406,8 @@ ProcXF86DRIDestroyDrawable(
{
REQUEST(xXF86DRIDestroyDrawableReq);
DrawablePtr pDrawable;
- REQUEST_SIZE_MATCH(xXF86DRIDestroyDrawableReq);
int rc;
+ REQUEST_SIZE_MATCH(xXF86DRIDestroyDrawableReq);
if (stuff->screen >= screenInfo.numScreens) {
client->errorValue = stuff->screen;
@@ -517,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);
@@ -576,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);