diff options
Diffstat (limited to 'xorg-server/Xext/xf86bigfont.c')
-rw-r--r-- | xorg-server/Xext/xf86bigfont.c | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/xorg-server/Xext/xf86bigfont.c b/xorg-server/Xext/xf86bigfont.c index 46b3242d1..5877a7174 100644 --- a/xorg-server/Xext/xf86bigfont.c +++ b/xorg-server/Xext/xf86bigfont.c @@ -278,23 +278,28 @@ ProcXF86BigfontQueryVersion(ClientPtr client) xXF86BigfontQueryVersionReply reply; REQUEST_SIZE_MATCH(xXF86BigfontQueryVersionReq); - reply = (xXF86BigfontQueryVersionReply) { - .type = X_Reply, - .sequenceNumber = client->sequence, - .length = 0, - .majorVersion = SERVER_XF86BIGFONT_MAJOR_VERSION, - .minorVersion = SERVER_XF86BIGFONT_MINOR_VERSION, - .uid = geteuid(), - .gid = getegid(), + + reply.type = X_Reply; + reply.sequenceNumber = client->sequence; + reply.length = 0; + reply.majorVersion = SERVER_XF86BIGFONT_MAJOR_VERSION; + reply.minorVersion = SERVER_XF86BIGFONT_MINOR_VERSION; + #ifdef WIN32 + reply.uid = 0; + reply.gid = 0; + #else + reply.uid = geteuid(); + reply.gid = getegid(); + #endif #ifdef HAS_SHM - .signature = signature, - .capabilities = (client->local && !client->swapped) + reply.signature = signature; + reply.capabilities = (client->local && !client->swapped) ? XF86Bigfont_CAP_LocalShm : 0 #else - .signature = 0, - .capabilities = 0 + reply.signature = 0; /* This is redundant. Avoids uninitialized memory. */ + reply.capabilities = 0; #endif - }; + if (client->swapped) { swaps(&reply.sequenceNumber); swapl(&reply.length); |