aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/randr/rrmode.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/randr/rrmode.c')
-rw-r--r--xorg-server/randr/rrmode.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/xorg-server/randr/rrmode.c b/xorg-server/randr/rrmode.c
index 49a45c7f6..56e5977b5 100644
--- a/xorg-server/randr/rrmode.c
+++ b/xorg-server/randr/rrmode.c
@@ -282,7 +282,7 @@ int
ProcRRCreateMode(ClientPtr client)
{
REQUEST(xRRCreateModeReq);
- xRRCreateModeReply rep = { 0 };
+ xRRCreateModeReply rep;
WindowPtr pWin;
ScreenPtr pScreen;
xRRModeInfo *modeInfo;
@@ -310,17 +310,18 @@ ProcRRCreateMode(ClientPtr client)
if (!mode)
return error;
- rep.type = X_Reply;
- rep.pad0 = 0;
- rep.sequenceNumber = client->sequence;
- rep.length = 0;
- rep.mode = mode->mode.id;
+ rep = (xRRCreateModeReply) {
+ .type = X_Reply,
+ .sequenceNumber = client->sequence,
+ .length = 0,
+ .mode = mode->mode.id
+ };
if (client->swapped) {
swaps(&rep.sequenceNumber);
swapl(&rep.length);
swapl(&rep.mode);
}
- WriteToClient(client, sizeof(xRRCreateModeReply), (char *) &rep);
+ WriteToClient(client, sizeof(xRRCreateModeReply), &rep);
/* Drop out reference to this mode */
RRModeDestroy(mode);
return Success;