aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xext/xf86bigfont.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/Xext/xf86bigfont.c')
-rw-r--r--xorg-server/Xext/xf86bigfont.c31
1 files changed, 17 insertions, 14 deletions
diff --git a/xorg-server/Xext/xf86bigfont.c b/xorg-server/Xext/xf86bigfont.c
index b4ef5e460..2bc5fc93f 100644
--- a/xorg-server/Xext/xf86bigfont.c
+++ b/xorg-server/Xext/xf86bigfont.c
@@ -278,23 +278,26 @@ 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.length = 0;
+ reply.sequenceNumber = client->sequence;
+ 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 = (LocalClient(client) && !client->swapped)
- ? XF86Bigfont_CAP_LocalShm : 0
+ reply.signature = signature;
+ reply.capabilities = (LocalClient(client) && !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) {
char tmp;