mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 05:54:08 +00:00
Use C99 designated initializers in various extension Replies
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Keith Packard <keithp@keithp.com> Tested-by: Daniel Stone <daniel@fooishbar.org>
This commit is contained in:
@@ -1816,14 +1816,15 @@ static int
|
||||
ProcRecordQueryVersion(ClientPtr client)
|
||||
{
|
||||
/* REQUEST(xRecordQueryVersionReq); */
|
||||
xRecordQueryVersionReply rep;
|
||||
xRecordQueryVersionReply rep = {
|
||||
.type = X_Reply,
|
||||
.sequenceNumber = client->sequence,
|
||||
.length = 0,
|
||||
.majorVersion = SERVER_RECORD_MAJOR_VERSION,
|
||||
.minorVersion = SERVER_RECORD_MINOR_VERSION
|
||||
};
|
||||
|
||||
REQUEST_SIZE_MATCH(xRecordQueryVersionReq);
|
||||
rep.type = X_Reply;
|
||||
rep.sequenceNumber = client->sequence;
|
||||
rep.length = 0;
|
||||
rep.majorVersion = SERVER_RECORD_MAJOR_VERSION;
|
||||
rep.minorVersion = SERVER_RECORD_MINOR_VERSION;
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber);
|
||||
swaps(&rep.majorVersion);
|
||||
@@ -2231,12 +2232,14 @@ ProcRecordGetContext(ClientPtr client)
|
||||
|
||||
/* write the reply header */
|
||||
|
||||
rep.type = X_Reply;
|
||||
rep.sequenceNumber = client->sequence;
|
||||
rep.length = length;
|
||||
rep.enabled = pContext->pRecordingClient != NULL;
|
||||
rep.elementHeader = pContext->elemHeaders;
|
||||
rep.nClients = nClients;
|
||||
rep = (xRecordGetContextReply) {
|
||||
.type = X_Reply,
|
||||
.enabled = pContext->pRecordingClient != NULL,
|
||||
.sequenceNumber = client->sequence,
|
||||
.length = length,
|
||||
.elementHeader = pContext->elemHeaders,
|
||||
.nClients = nClients
|
||||
};
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
|
||||
Reference in New Issue
Block a user