diff --git a/hw/xfree86/dri/xf86dri.c b/hw/xfree86/dri/xf86dri.c index c1e9dd795..64574af73 100644 --- a/hw/xfree86/dri/xf86dri.c +++ b/hw/xfree86/dri/xf86dri.c @@ -81,11 +81,10 @@ ProcXF86DRIQueryVersion(register ClientPtr client) .patchVersion = SERVER_XF86DRI_PATCH_VERSION }; - if (client->swapped) { - swaps(&reply.majorVersion); - swaps(&reply.minorVersion); - swapl(&reply.patchVersion); - } + REPLY_FIELD_CARD16(majorVersion); + REPLY_FIELD_CARD16(minorVersion); + REPLY_FIELD_CARD32(patchVersion); + return X_SEND_REPLY_SIMPLE(client, reply); } @@ -112,7 +111,7 @@ ProcXF86DRIQueryDirectRenderingCapable(register ClientPtr client) if (!client->local || client->swapped) isCapable = 0; - xXF86DRIQueryDirectRenderingCapableReply reply = { + xXF86DRIQueryDirectRenderingCapableReply rep = { .isCapable = isCapable }; @@ -411,7 +410,7 @@ ProcXF86DRIGetDeviceInfo(register ClientPtr client) X_REQUEST_HEAD_STRUCT(xXF86DRIGetDeviceInfoReq); drm_handle_t hFrameBuffer; - void *pDevPrivate; + void *pDevPrivate = NULL; ScreenPtr pScreen = dixGetScreenPtr(stuff->screen); if (!pScreen) {